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];