I am having a problem when running my NSDictionary eastDict through allKeys
The first NSLog runs correctly...the key 1, which should be the first sorted key returns the correct value, so I know that isn't the problem.
But the second NSLog returns a strange 10 digit number (-1607296528). Any ideas as to why this is happening?
Code:
NSBundle *eastBundle = [NSBundle mainBundle];
NSString *eastPath = [eastBundle pathForResource:@"StreetEast" ofType: @"plist"];
eastDict = [[NSDictionary alloc] initWithContentsOfFile:eastPath];
NSLog([eastDict objectForKey:@"1"]);
NSArray *ranges = [[eastDict allKeys] sortedArrayUsingSelector: @selector(compare: )];
NSLog([NSString stringWithFormat:@"%d", [ranges objectAtIndex:0]]);
The first NSLog runs correctly...the key 1, which should be the first sorted key returns the correct value, so I know that isn't the problem.
But the second NSLog returns a strange 10 digit number (-1607296528). Any ideas as to why this is happening?