mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 06:40:38 +00:00
* Headers/AppKit/NSKeyValueBinding.h,
* Source/externs.m: Additional binding name * NSContentValuesBinding. * Source/NSPopUpButton.m: Add KVB for NSContentValuesBinding. Patch by Marcian Lytwyn <marcian.lytwyn@advcsi.com> * Source/NSArrayController.m: Encode/decode * clearsFilterPredicateOnInsertion. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36540 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
67daa51afa
commit
3aa97e1975
5 changed files with 33 additions and 6 deletions
|
@ -67,6 +67,7 @@ Class _nspopupbuttonCellClass = 0;
|
|||
[self exposeBinding: NSSelectedIndexBinding];
|
||||
[self exposeBinding: NSSelectedObjectBinding];
|
||||
[self exposeBinding: NSSelectedTagBinding];
|
||||
[self exposeBinding: NSContentValuesBinding];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -572,6 +573,11 @@ this to return nil to indicate that we have no context menu.
|
|||
{
|
||||
[self selectItemWithTag: [anObject intValue]];
|
||||
}
|
||||
else if ([aKey isEqual: NSContentValuesBinding])
|
||||
{
|
||||
[self removeAllItems];
|
||||
[self addItemsWithTitles: (NSArray*)anObject];
|
||||
}
|
||||
else
|
||||
{
|
||||
[super setValue: anObject forKey: aKey];
|
||||
|
@ -592,6 +598,10 @@ this to return nil to indicate that we have no context menu.
|
|||
{
|
||||
return [NSNumber numberWithInt: [self selectedTag]];
|
||||
}
|
||||
else if ([aKey isEqual: NSContentValuesBinding])
|
||||
{
|
||||
return [self itemTitles];
|
||||
}
|
||||
else
|
||||
{
|
||||
return [super valueForKey: aKey];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue