On Feb 24, 2009, at 4:59 PM, Mic Pringle wrote:

If I hook up a button to the add selector of the NSArrayController it
works as you'd expect and the new instances populate the table (using
default data).

I have looked for delegate methods in both NSArrayController and
NSTableView to see if I can get notification of when a new instance is
created so that I can then use that to pop up the sheet, but to no
avail.

Can anyone help and point me in the right direction of how to do this ?

Have you considered not having the button target the add: selector of the array controller? Instead have it target a method of your own design on the coordinating controller for the window. Then you can have it do whatever you like, including dropping down a sheet to collect the information for the new object, creating that new object, and inserting it into the to-many relationship.

Cheers,
Ken

_______________________________________________

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