I'm using an NSDictionaryController object to control the data provided to an NSTableView object. I'm attempting to use key-value coding through the dictionary controller to manipulate the data in a bindings-compatible way, by calling the method -arrangedObjects on the NSDictionaryController, and then manipulating the NSDictionaryControllerKeyValuePairs that this method returns in an array.

Any luck?

I am having a similar problem - mutable dictionary objects that are themselves stored in a dictionary will be presented as immutable dictionaries by the NSDictionaryController. This makes it impossible to bind controls to keypaths that drill into dictionaries below the level of the outermost container.

i.e. even if arrangedObjects.value should point to a mutable dictionary, attempts to edit arrangedObjects.value.someKey via a UI control will generate the following error:

*** -[NSCFDictionary setObject:forKey:]: mutating method sent to immutable object

Having a workaround for this would be really nice - has anyone found one? I will file a bug as I don't think this is the behavior most would expect.

This is turning something that would have "just worked" in about fifteen minutes into yet another quest for a messy workaround...

Thanks in advance,

Rick
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to