• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSPopUpButtonCell -- I need an outlet to gain access to the button
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSPopUpButtonCell -- I need an outlet to gain access to the button
      • From: "I. Savant" <email@hidden>
  • Prev by Date: Re: drag and drop problem.
  • Next by Date: Re: NSPopUpButtonCell -- I need an outlet to gain access to the button
  • Previous by thread: Re: Applescript good book? [was: Trying to get folder path of a Finder window]
  • Next by thread: Re: NSPopUpButtonCell -- I need an outlet to gain access to the button
  • Index(es):
    • Date
    • Thread