* Source/NSPopUpButtonCell.m: Override -representedObject and

-setRepresentedObject: with implementations that delegate the
call to [self selectedItem] (the NSMenuItem).


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32943 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Eric Wasylishen 2011-04-29 00:17:01 +00:00
parent ea58698be4
commit 63b253d53f
2 changed files with 16 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2011-04-28 Eric Wasylishen <ewasylishen@gmail.com>
* Source/NSPopUpButtonCell.m: Override -representedObject and
-setRepresentedObject: with implementations that delegate the
call to [self selectedItem] (the NSMenuItem).
2011-04-27 Eric Wasylishen <ewasylishen@gmail.com>
* Source/NSTextView.m (-selectionRangeForProposedRange:granularity:):

View file

@ -783,6 +783,16 @@ static NSImage *_pbc_image[5];
return _selectedItem;
}
- (id) representedObject
{
return [[self selectedItem] representedObject];
}
- (void) setRepresentedObject: (id)object
{
[[self selectedItem] setRepresentedObject: object];
}
- (int) indexOfSelectedItem
{
return [_menu indexOfItem: [self selectedItem]];