Re: Bug in NSArrayController? (immutable instead of mutable dictionaries)
Re: Bug in NSArrayController? (immutable instead of mutable dictionaries)
- Subject: Re: Bug in NSArrayController? (immutable instead of mutable dictionaries)
- From: Uli Zappe <email@hidden>
- Date: Sat, 23 Oct 2004 07:43:37 +0200
Am 23.10.2004 um 07:24 schrieb Scott Anguish:
It's not the controller chaining that is an issue, not at all.
The situation I worked on was one where there was an array of data
that was stored in defaults. When you added an item, the defaults
applied immediately, and there was a complaint of a NULL value.
You mean you added the item *directly* to the array in the user
defaults? Well, then of course our situations would be different, since
I edit an array outside of the user defaults, and *then*
NSArrayController sends it to NSUserDefaultsController.
There were other issues as well, in trying to keep the correct items
selected when the array had items added to it. Selection was lost.
As I said, I still have to thoroughly check that. No problems so far,
though.
Also, why do you say I edit my array "directly from
NSUserDefaultsController"? From my understanding, that's exactly what
I don't do. I edit the array in NSArrayController, which *after the
change* propagates this change to NSUserDefaultsController via KVC.
Right, but it is the same data. The way I was suggesting actually
copied the data as a whole, modified that, and then replaced the
original data wholesale.
In a way that's what's happening in my implementation, too, because my
value transformer creates a copy each time the array is send to
NSArrayController. Admittedly, it does not do this in the other
direction (to NSUserDefaultsController), but if I encountered problems
and found out a copy was needed also in this direction, it would be
easy to do this in my value transformer, too, of course.
Anyway, should I encounter further problems, I will report that to the
list. If all turns out to work solidly for several weeks, I will also
report that. :-)
Bye
Uli
________________________________________________________
Uli Zappe, Solmsstraße 5, D-65189 Wiesbaden, Germany
http://www.ritual.org
Fon: +49-700-ULIZAPPE
Fax: +49-700-ZAPPEFAX
________________________________________________________
_______________________________________________
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