Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

Thread: Out of memory
View Single Post
Old 03-17-2010, 11:16 PM   #8 (permalink)
iisword
Knows SQL
 
iisword's Avatar
 
Join Date: Oct 2009
Location: Somewhere the streets are on fire, the sewers are flooded, and the cats are high on catnip
Posts: 529
iisword is on a distinguished road
Default

I got rid of my set methods and tried using this way:
Code:
NSLog(@"Setting Postition");
	self.currentPosition = newLocation;
	NSLog(@"Position Set");
	
	NSLog(@"Getting current date");
	NSDate *currentDate = [NSDate date];
	NSDateFormatter *format = [[NSDateFormatter alloc] init];
	[format setDateFormat:@"MMM dd, yyyy HH:mm"];
	NSString *dateString = [[NSString alloc] initWithString:[format stringFromDate:currentDate]];
	NSLog(@"Date Set");
	
	NSString *entryString = [[NSString alloc] initWithString:entry.text];
	
	[entry release];
	[format release];
	[currentDate release];
	
	float lat = currentPosition.coordinate.latitude; 
	float lon = currentPosition.coordinate.longitude;
	NSString *location;
	
	if (lat < 0 && lat < 0)
	{
		lat = -lat;
		lon = -lon;
		location = [[NSString alloc] initWithFormat:@"Latitude:%1.2f°S   Longitude:%1.2f°W", lat, lon];
	}
	else if (lat> 0 && lon > 0)
	{
		location = [[NSString alloc] initWithFormat:@"Latitude:%1.2f°N   Longitude:%1.2f°E", lat, lon];
	}
	else if (lon < 0 && lat > 0)
	{
		lon = -lon;
		location = [[NSString alloc] initWithFormat:@"Latitude:%1.2f°N   Longitude:%1.2f°W", lat, lon];
	}
	else
	{
		lat = -lat;
		location = [[NSString alloc] initWithFormat:@"Latitude:%1.2f°N   Longitude:%1.2f°E", lat, lon];
	}
	NSLog(location);
	NSLog(dateString);
	
	NSLog(@"Saving to database");
	[appDelegate addEntry:entryString withLocation:location withDate:dateString];

	[save setHidden:NO];
	[active stopAnimating];
	[location release];
	[dateString release];
	[entryString release];
still getting the same error
__________________
iisword is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 175,542
Threads: 94,064
Posts: 402,675
Top Poster: BrianSlick (7,989)
Welcome to our newest member, DieScumBag
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 01:35 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.