• 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
Re: Detecting changes to NSPopUpButtonCell in an NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Detecting changes to NSPopUpButtonCell in an NSTableView


  • Subject: Re: Detecting changes to NSPopUpButtonCell in an NSTableView
  • From: Jerry Krinock <email@hidden>
  • Date: Fri, 24 Apr 2009 05:25:56 -0700


On 2009 Apr 23, at 16:39, Ulai Beekam wrote:

Furthermore, it doesn't seem to make too much sense to bind the selected index to a single variable because, as you say, I have multiple rows and the popupmenu for each one.

Actually I can think of one weird way of making it work: Having an instance variable "int selectedIndex" with ONLY a setter method (NOT a getter method). That way change in one of the rows will not propagate to other rows. And I can then do my stuff in the setter method. But hmm, this is just too weird to be the best solution available out there, assuming it even works :S

Indeed, this is too weird. The normal way to use bindings with a table is to bind through an array controller to the key path arrangedObjects.foo. Almost any Apple Sample Project containing a table will do this.


However, this is only relevant if you want to convert your table to use bindings.

Getting back to your original question, without using bindings, I'd say that you detect changes in the implementation of the action method which you have assigned to the NSPopUpButtonCell's menu.

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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


References: 
 >Detecting changes to NSPopUpButtonCell in an NSTableView (From: Ulai Beekam <email@hidden>)
 >Re: Detecting changes to NSPopUpButtonCell in an NSTableView (From: ALEXander <email@hidden>)
 >RE: Detecting changes to NSPopUpButtonCell in an NSTableView (From: Ulai Beekam <email@hidden>)

  • Prev by Date: RE: How to clone a mutable dictionary
  • Next by Date: Re: Best technology to use for overlays?
  • Previous by thread: RE: Detecting changes to NSPopUpButtonCell in an NSTableView
  • Next by thread: Core Data and the Application Delegate
  • Index(es):
    • Date
    • Thread