Re: Help with sheets, NSArrayController & NSTableView (all working together) ...
Re: Help with sheets, NSArrayController & NSTableView (all working together) ...
- Subject: Re: Help with sheets, NSArrayController & NSTableView (all working together) ...
- From: Ken Thomases <email@hidden>
- Date: Tue, 24 Feb 2009 21:16:55 -0600
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 (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