mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-29 23:40:38 +00:00
Add a few key value bindings.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33277 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d25ee73927
commit
c744492fee
8 changed files with 73 additions and 1 deletions
|
@ -65,6 +65,9 @@ Class _nspopupbuttonCellClass = 0;
|
|||
[self setCellClass: [NSPopUpButtonCell class]];
|
||||
|
||||
[self exposeBinding: NSSelectedIndexBinding];
|
||||
[self exposeBinding: NSSelectedObjectBinding];
|
||||
[self setKeys: [NSArray arrayWithObject: NSSelectedIndexBinding]
|
||||
triggerChangeNotificationsForDependentKey: NSSelectedObjectBinding];
|
||||
[self exposeBinding: NSSelectedTagBinding];
|
||||
[self setKeys: [NSArray arrayWithObject: NSSelectedIndexBinding]
|
||||
triggerChangeNotificationsForDependentKey: NSSelectedTagBinding];
|
||||
|
@ -575,6 +578,10 @@ this to return nil to indicate that we have no context menu.
|
|||
{
|
||||
[self selectItemWithTag: [anObject integerValue]];
|
||||
}
|
||||
else if ([aKey isEqual: NSSelectedObjectBinding])
|
||||
{
|
||||
[self selectItemWithTag: [anObject intValue]];
|
||||
}
|
||||
else
|
||||
{
|
||||
[super setValue: anObject forKey: aKey];
|
||||
|
@ -591,6 +598,10 @@ this to return nil to indicate that we have no context menu.
|
|||
{
|
||||
return [NSNumber numberWithInteger: [self selectedTag]];
|
||||
}
|
||||
else if ([aKey isEqual: NSSelectedObjectBinding])
|
||||
{
|
||||
return [NSNumber numberWithInt: [self selectedTag]];
|
||||
}
|
||||
else
|
||||
{
|
||||
return [super valueForKey: aKey];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue