From 9d92f03d0a7fda279545ef93874c0d163209c55c Mon Sep 17 00:00:00 2001 From: Doug Simons Date: Wed, 26 Aug 2009 16:58:49 +0000 Subject: [PATCH] Implemented selectedTag to work correctly git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/testplant_1@28549 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 4 ++++ Source/NSPopUpButton.m | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/ChangeLog b/ChangeLog index 8e95279d9..e670bcd3c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-08-26 Douglas Simons + + * Source/NSPopUpButton.m: Implemented selectedTag to work correctly. + 2009-08-20 Douglas Simons * Source/GSLayoutManager.m: Fix bug with glyphRangeForCharacterRange:actualCharacterRange: diff --git a/Source/NSPopUpButton.m b/Source/NSPopUpButton.m index 104b85b80..519c85a85 100644 --- a/Source/NSPopUpButton.m +++ b/Source/NSPopUpButton.m @@ -251,6 +251,14 @@ this to return nil to indicate that we have no context menu. return [_cell indexOfSelectedItem]; } +/**

Returns the tag of the selected item

+

See Also: [NSPopUpButtonCell-indexOfSelectedItem]

+ */ +- (int) selectedTag +{ + return [[_cell selectedItem] tag]; +} + - (void) selectItem: (id )anObject { [self willChangeValueForKey: NSSelectedIndexBinding];