Skip to content

Commit

Permalink
- fix issue sorting a Boolean or NSNumber field that contains a nil v…
Browse files Browse the repository at this point in the history
…alue for row yepher#1 (nil will get changed to NSString("") and the comparison description gets set to compareCaseInsensitive. Solution used here is to treat all objects as a string
  • Loading branch information
Joe Page committed Nov 11, 2014
1 parent 2d52c45 commit ad284b6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CoreDataUtil/CoreData/MFLCoreDataIntrospection.m
Expand Up @@ -319,6 +319,10 @@ + (id)getDisplayValueForObject:(id)obj dateStyle:(NSDateFormatterStyle) dateStyl

return [NSString stringWithFormat:@"%ld bytes", [data length]];
}
else if ([obj isKindOfClass:[NSNumber class]]) {
NSNumber *number = obj;
return [NSString stringWithFormat:@"%f", number.floatValue];
}
else
{
return obj;
Expand Down

0 comments on commit ad284b6

Please sign in to comment.