New method used by Apple NIB files.

Patch by Doug Simons <doug@riverrock.org>.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28204 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2009-04-11 20:28:08 +00:00
parent fad769e84d
commit 82aa5286ac
2 changed files with 25 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2009-04-11 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSPopUpButtonCell.m (-_popUpItemAction:): New method used
by Apple NIB files.
Patch by Doug Simons <doug@riverrock.org>.
2009-04-10 15:30-EDT Gregory John Casamento <greg_casamento@yahoo.com>
* Source/NSApplication.m: Follow the NSApplication responder

View file

@ -44,6 +44,10 @@
* and so on. */
static NSImage *_pbc_image[5];
@interface NSPopUpButtonCell (CocoaExtensions)
- (void) _popUpItemAction: (id)sender;
@end
@implementation NSPopUpButtonCell
+ (void) initialize
{
@ -384,6 +388,9 @@ static NSImage *_pbc_image[5];
// FIXME: The documentation is unclear what to set here.
//[anItem setAction: [self action]];
//[anItem setTarget: [self target]];
// Or
//[anItem setAction: @selector(_popUpItemAction:)];
//[anItem setTarget: self];
// Select the new item if there isn't any selection.
if (_selectedItem == nil)
@ -1207,3 +1214,15 @@ static NSImage *_pbc_image[5];
}
@end
@implementation NSPopUpButtonCell (CocoaExtensions)
/*
* The selector for this method gets used by menu items in Apple NIB files.
*/
- (void) _popUpItemAction: (id)sender
{
[NSApp sendAction: [self action] to: [self target] from: self];
}
@end