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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to