mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 12:00:52 +00:00
* Source/NSCell.m (-compare:): Compare the stringValue of
NSCell's rather than thier contents directly. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17732 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
1fcb726542
commit
c4f7312717
2 changed files with 13 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
2003-09-27 David Ayers <d.ayers@inode.at>
|
||||
|
||||
* Source/NSCell.m (-compare:): Compare the stringValue of
|
||||
NSCell's rather than thier contents directly.
|
||||
|
||||
2003-09-23 19:14 Alexander Malmberg <alexander@malmberg.org>
|
||||
|
||||
* Source/NSWindow.m (-orderWindow:relativeTo:): Only force a display
|
||||
|
|
|
@ -1056,8 +1056,11 @@ static NSColor *shadowCol;
|
|||
return [self menu];
|
||||
}
|
||||
|
||||
/*
|
||||
* Comparing to Another NSCell
|
||||
/**
|
||||
* Compares the reciever to another to another NSCell.
|
||||
* The argument must be an NSCell sublclass and have
|
||||
* the NSCellType NSTextCellType. Returns the result
|
||||
* of the comparison of each cell's stringVaule.
|
||||
*/
|
||||
- (NSComparisonResult) compare: (id)otherCell
|
||||
{
|
||||
|
@ -1072,7 +1075,9 @@ static NSColor *shadowCol;
|
|||
[NSException raise: NSBadComparisonException
|
||||
format: @"Comparison between non-text cells"];
|
||||
}
|
||||
return [_contents compare: ((NSCell*)otherCell)->_contents];
|
||||
/* We shouldn't access instance variables directly as subclasses
|
||||
may override stringValue to retrieve the value from somewhere else. */
|
||||
return [[self stringValue] compare: [(NSCell*)otherCell stringValue]];
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue