Re: nsarraycontroller and object updating
Re: nsarraycontroller and object updating
- Subject: Re: nsarraycontroller and object updating
- From: Daryn <email@hidden>
- Date: Fri, 19 Dec 2003 19:57:48 -0600
I noticed that if I use an NSObjectController bound directly to a model
keypath of file's owner, that any changes to the dictionary result in
the entire dictionary being stored. This is the behavior that I want
for objects managed by NSArrayController.
Therefor, I thought that binding a new NSObjectController to the
NSArrayController's selection, and binding the ui elements to the new
object controller, would result in the entire dictionary being stored
in the array when ui elements were twiddled. I was wrong.
Now I'm completely confused. The behavior of controllers is seemingly
unpredictable. If this is an RTFM question, please provide a url to
the FM. Thanks.
On Dec 19, 2003, at 2:03 PM, Daryn wrote:
Is there an easy way to force NSArrayController to always update the
entire object it manages in the array, rather than just a subkey of the
object?
For example, I have a class with indexed accessors for contentArray to
which which I bind an array controller. When contentArray.<N>.name is
updated in the UI, I don't want contentArray.<N>.name to be directly
updated. I would like contentArray.<N>=object behavior. Essentially,
I would like replaceObjectInContentArrayAtIndex: to be invoked.
Do need to override setValue:forKeyPath: in my class with the indexed
accessors, or is there a better way?
[demime 0.98b removed an attachment of type
application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.