mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-30 20:07:36 +00:00
Support key paths instead of simple keys in sort descriptors. Match Cocoa's behavior here.
This commit is contained in:
1 parent
95b9ea336b
commit
eaf701beca
1 file changed
+1
-1
@@ -136,7 +136,7 @@ CPOrderedDescending = 1;
|
||||
*/
|
||||
- (CPComparisonResult)compareObject:(id)lhsObject withObject:(id)rhsObject
|
||||
{
|
||||
return (_ascending ? 1 : -1) * [[lhsObject valueForKey:_key] performSelector:_selector withObject:[rhsObject valueForKey:_key]];
|
||||
return (_ascending ? 1 : -1) * [[lhsObject valueForKeyPath:_key] performSelector:_selector withObject:[rhsObject valueForKeyPath:_key]];
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
Reference in new issue
Block a user