mirror of
https://github.com/darlinghq/darling-cocotron.git
synced 2024-11-27 22:10:23 +00:00
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:
parent
a5cb7579d6
commit
010c11a3eb
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user