NSPopUpButtonCell -- I need an outlet to gain access to the button
NSPopUpButtonCell -- I need an outlet to gain access to the button
- Subject: NSPopUpButtonCell -- I need an outlet to gain access to the button
- From: Dalton Hamilton <email@hidden>
- Date: Wed, 16 May 2007 12:29:35 -0400
Hello,
I'm trying to get an NSPopUpButton inside one of my columns of an
NSTableView. I've gotten really close but not quite there.
The NSPopUpButton shows by dong this:
NSTableColumn *typeSystemColumn;
NSPopUpButtonCell *cellSystemType;
cellSystemType = [[NSPopUpButtonCell alloc] init];
[cellSystemType setBordered:NO];
[cellSystemType addItemWithTitle:@"ESA"];
[cellSystemType addItemWithTitle:@"WSA"];
[cellSystemType setAction:@selector(systemTypeButtonAction:)];
[cellSystemType setTarget:self];
[cellSystemType setControlSize:NSSmallControlSize];
typeSystemColumn = [systemsTV tableColumnWithIdentifier:@"type"];
[typeSystemColumn setDataCell:cellSystemType];
[cellSystemType release];
The systemTypeButtonAction: method is called when I select the
button, however I don't know how to to get access to the
NSPopUpButton to figure out which index the user chose. The method
is defined as:
-(IBAction)systemTypeButtonAction:(id)sender
{
// sender is pointing to the NSTableView object. I need a way to
access the NSPopUpButton
// do something
}
And when it is called, the "sender" is the NSTableViw object. I need
something like an outlet.
Thanks a lot for any help. I've spent hours on the web trying to
figure this out -- I don't see any good (or complete) examples.
Dalton Hamilton
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden