mirror of
https://github.com/gnustep/libs-gdl2.git
synced 2025-02-19 17:50:47 +00:00
(-selectNext): Implement.
(-selectPrevious): Ditto. (-enabledToSetSelectedObjectValueForKey:): Handle query mode. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@23638 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e37c39caec
commit
9afa810960
2 changed files with 30 additions and 5 deletions
|
@ -1,3 +1,10 @@
|
|||
|
||||
2006-09-27 Matt Rice <ratmice@yahoo.com>
|
||||
|
||||
(-selectNext): Implement.
|
||||
(-selectPrevious): Ditto.
|
||||
(-enabledToSetSelectedObjectValueForKey:): Handle query mode.
|
||||
|
||||
2006-09-22 Matt Rice <ratmice@yahoo.com>
|
||||
|
||||
* EOInterface/EODisplayGroup.m
|
||||
|
|
|
@ -821,11 +821,31 @@ static BOOL _globalDefaultForValidatesChangesImmediately = NO;
|
|||
|
||||
- (BOOL)selectNext
|
||||
{
|
||||
return NO;
|
||||
id selObj = [self selectedObject];
|
||||
unsigned idx;
|
||||
|
||||
if (selObj == nil) return NO;
|
||||
|
||||
idx = [[self displayedObjects]
|
||||
indexOfObjectIdenticalTo:[self selectedObject]];
|
||||
|
||||
if (idx == UINT_MAX) return NO;
|
||||
|
||||
return [self setSelectionIndexes:[NSArray arrayWithObject:[NSNumber numberWithUnsignedInt:++idx]]];
|
||||
}
|
||||
- (BOOL)selectPrevious
|
||||
{
|
||||
return NO;
|
||||
id selObj = [self selectedObject];
|
||||
unsigned idx;
|
||||
|
||||
if (selObj == nil) return NO;
|
||||
|
||||
idx = [[self displayedObjects]
|
||||
indexOfObjectIdenticalTo:[self selectedObject]];
|
||||
|
||||
if (idx == 0) return NO;
|
||||
|
||||
return [self setSelectionIndexes:[NSArray arrayWithObject:[NSNumber numberWithUnsignedInt:--idx]]];
|
||||
}
|
||||
|
||||
- (BOOL)clearSelection
|
||||
|
@ -1237,9 +1257,7 @@ static BOOL _globalDefaultForValidatesChangesImmediately = NO;
|
|||
|
||||
- (BOOL)enabledToSetSelectedObjectValueForKey:(NSString *)key
|
||||
{
|
||||
return [self selectedObject]
|
||||
? YES
|
||||
: [key hasPrefix: @"@query"];
|
||||
return [self selectedObject] || [key hasPrefix: @"@query"] || _flags.queryMode;
|
||||
}
|
||||
|
||||
- (BOOL)association: (EOAssociation *)association
|
||||
|
|
Loading…
Reference in a new issue