NSCell did not attempt failover to [_objectValue description] in case _objectValue did not support selector -descriptionWithLocale:

also added silent return of empty string in case even -description is not supported
This commit is contained in:
Ivan Vučica 2010-09-21 20:54:45 +02:00
parent a5cb7579d6
commit 010c11a3eb

View File

@ -267,7 +267,12 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
else if([_objectValue isKindOfClass:[NSString class]])
return _objectValue;
return [_objectValue descriptionWithLocale:[NSLocale currentLocale]];
if([_objectValue respondsToSelector:@selector(descriptionWithLocale:)])
return [_objectValue descriptionWithLocale:[NSLocale currentLocale]];
else if([_objectValue respondsToSelector:@selector(description)])
return [_objectValue description];
else
return @"";
}
-(int)intValue {