• 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 in subclass of NSCell - Selection not working
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSPopUpButtonCell in subclass of NSCell - Selection not working


  • Subject: NSPopUpButtonCell in subclass of NSCell - Selection not working
  • From: Michael Becker <email@hidden>
  • Date: Mon, 8 Nov 2004 14:16:56 +0100

Hi!

Okay, it seems like I am finally almost done with this, there's only one major flaw. I have a tableview displaying custom cells in one column. The custom cells hold an NSImage and an NSPopUpButton. Now here's my problem: I cannot get the NSPopUpButton to work properly.

I have managed to set up my custom cell so that the NSPopUpButton is connected to my controller via the action/target mechanism. I actually really ONLY set up the NSPopUpButton for the action/target. So whenever (and only when) the user changes the selection of any of the displayed NSPopUpButtons, the following code produces output:

- (void)cartItemChangedVariant:(id)sender
{
NSLog(@"%@", sender); // This tells me that NSTableView is the sender??
}


Actually I want this method (the action) to get the newly selected item of the NSPopUpButton and save the selected index to my model object. In -tableView:willDisplayCell:forTableColumn:row: I would re-apply the selections to the actual NSPopUpButtons. (Thanks to M.Uli Kusterer for pointing that out to me)

However, I cannot see any way of *receiving* the selection changes. Since the "sender" (see above) is the NSTableView, I cannot seem to reach the actual NSPopUpButton which the user just clicked and changed.

Any help would be greatly appreciated.

Cheers,
Michael

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: NSPopUpButtonCell in subclass of NSCell - Selection not working
      • From: "M. Uli Kusterer" <email@hidden>
    • [SOLVED] Re: NSPopUpButtonCell in subclass of NSCell - Selection not working
      • From: Michael Becker <email@hidden>
  • Prev by Date: [SOLVED]RE: NSNumberFormatter question
  • Next by Date: Re: get subimage from an NSImage
  • Previous by thread: [SOLVED]RE: NSNumberFormatter question
  • Next by thread: [SOLVED] Re: NSPopUpButtonCell in subclass of NSCell - Selection not working
  • Index(es):
    • Date
    • Thread