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: Scott Anguish <email@hidden>
- Date: Fri, 22 Oct 2004 00:30:45 -0400
On Oct 21, 2004, at 10:49 PM, Uli Zappe wrote:
At 3:50 Uhr +0200 22.10.2004, Uli Zappe wrote:
Well, it doesn't in that NSUserDefaultsController does *not* always
return immutable objects;
However, it is *documented* as returning immutable objects. That's
all the guarantee you get.
OK, maybe you're right and it's a documentation bug, because
NSUserDefaultsController says nothing about changing mutable to
immutable.
I thought this was documented, but it doesn't seem to be. I've
filed a bug.
NSUserDefaultsController uses NSUserDefaults, which stores only
immutable objects.
Note that even if it were documented that NSUserDefaults returns
immutable objects, that *does not* imply that a Binding to
NSUserDefaultsController changes the mutability of the objects in the
bound container.
I think this is likely due to a KVC issue where an entire array is
being replaced because indexed accessors isn't available.
IMHO, a binding should *never* do that, and it is a real showstopper
for this technology because it can lead to all kinds of problems. So I
think you could very well argue that no matter how NSUserDefaults
behave, NSUserDefaultsController should take care to only return
mutable objects to NSArrayController if NSArrayController's class
object is mutable.
there is no two way communication there...
_______________________________________________
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