NSSortDescriptor, applied patch from Saso Kiselkov.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@22881 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Nicolas Roard 2006-05-09 22:29:35 +00:00
parent 43e400e2b2
commit 5aaf7ecd23
2 changed files with 10 additions and 4 deletions

View file

@ -1,3 +1,8 @@
2006-05-09 Nicolas Roard <nicolas@roard.com>
* Source/NSSortDescriptor.m: use -valueForKeyPath: instead
of -valueForKey:. Patch from Saso Kiselkov <diablos@manga.sk>.
2006-05-09 Dr. H. Nikolaus Schaller
* Source/GNUmakefile:

View file

@ -23,10 +23,11 @@
#include "Foundation/NSSortDescriptor.h"
#include "Foundation/NSString.h"
#include "Foundation/NSBundle.h"
#include "Foundation/NSCoder.h"
#include "Foundation/NSException.h"
#include "Foundation/NSBundle.h"
#include "Foundation/NSKeyValueCoding.h"
#include "Foundation/NSString.h"
@implementation NSSortDescriptor
@ -89,8 +90,8 @@
- (NSComparisonResult) compareObject: (id) object1 toObject: (id) object2
{
NSComparisonResult result;
id comparedKey1 = [object1 valueForKey: _key],
comparedKey2 = [object2 valueForKey: _key];
id comparedKey1 = [object1 valueForKeyPath: _key],
comparedKey2 = [object2 valueForKeyPath: _key];
result = (NSComparisonResult) [comparedKey1 performSelector: _selector
withObject: comparedKey2];