The Core Data Documentation states that:
The fetch request associated with the [fetched] property can have a sort ordering, and thus the fetched prope
Jeff, if the strings are right-aligned, you could just sort on the strings; " 123" > " 23" and so on. But iirc ascii space is after the numbers, and if so, then what you would do is create a dynamic property that is an NSNumber (which supports the compare: method), and use the numberFromString: method to make a number from the string. Then you can specify the number field in the sort. In the interface:
@property NSString *stringIsaNumber; // in the data model
@property NSNumber *number;
in the implementation:
@dynamic stringIsaNumber;
- (NSNumber *) number ;
{ return [self.stringIsaNumber numberFromString]; }
- (void) setNumber:(NSNumber *)value;
{ self.stringIsaNumber = [NSString stringWithFormat:@"%5i",value) }
ps plz forgive coding errors, this is off the top of my head.