Creating a codeless, friendly NSArrayController
Creating a codeless, friendly NSArrayController
- Subject: Creating a codeless, friendly NSArrayController
- From: Bob Sanders <email@hidden>
- Date: Sun, 4 Sep 2005 17:44:08 -0500
I want to do something that seems fairly straightforward, but after hours of
experimenting I've gotten nowhere.
The current behavior for the add: action in the NSArrayController (using
managed data) is to insert an "empty" object, and then allow the user to
enter all the values. Its nice that this can be done without writing any
code, but its not very friendly, in that the user sees an empty object show
up in a TableView and has to then edit it.
What should happen is that the user enters the data for a new object and
clicks an "Add" button, which performs any validation needed and THEN
inserts the object.
This seemed easy enough: I would create an addition NSObjectController and
bind the input elements to it (instead of to the NSArrayController). I would
(somehow) have the add: action insert the object represented by the
NSObjectController after some data validation had taken place.
The problem is I can't figure out how to bind an NSObjectController to the
selected object of an NSArrayController. No combination of binding
parameters seems to work.
I can see how this could be done with a good deal of coding, but I want to
make sure I'm not missing something simple. Any thoughts?
Thanks,
Bob
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden