Help with sheets, NSArrayController & NSTableView (all working together) ...
Help with sheets, NSArrayController & NSTableView (all working together) ...
- Subject: Help with sheets, NSArrayController & NSTableView (all working together) ...
- From: Mic Pringle <email@hidden>
- Date: Tue, 24 Feb 2009 22:59:09 +0000
Hi,
I hoping someone can point me in the right direction on this as I'm
really struggling to get it all to work.
I have a class which holds two NSString properties, an NSImage
property and an NSPredicate property.
I have an array that holds instances of this class, and an
NSArrayController hooked up to that array.
I have a NSTableView with a custom cell, which displays the image,
name (1st NSString property) and description (2nd NSString property)
for each instance of the class in the NSArrayController.
So, because the custom cell draws its data as it does, I cannot simply
allow the end user to edit in cell so have disabled that
functionality.
Would I would like to do is to pop up a sheet that has a form on it to
edit the new instance of the class just added by clicking the button
linked to the add selector, but this is what I can't figure out how to
do ?
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 ?
Thanks,
-Mic
_______________________________________________
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