I’m using a NSValueTransformer object to convert my Core Data to-many ordered 
relationship from a NSOrderedSet to a NSArray so NSArrayController can use it. 
I just connected a NSButton to the controller’s “add:” action. I get this:

> NSManagedObjects of entity 'Message' do not support -mutableArrayValueForKey: 
> for the property ‘header'

So it seems that the controller skips my converted value and tries to alter the 
property directly, which it can’t. I thought that the problem was that 
NSOrderedSet.array returns an array of funny proxies, but manually copying to a 
NSMutableArray and returning that didn’t work either. So it seems that I have 
to make custom actions to add objects, and hopefully the controller will see 
the changes.

But I’m wondering if I should go nuclear and create the NSOrderedSetController 
that Apple should have done years ago. I don’t know how hard this’ll be. It 
would be a serving-side Binding class. It would inherit from NSObjectController 
since NSArrayController would have those extra NSArray/NSSet connection methods.

Does the Bindings section of the Interface Builder section of Xcode hard-code 
the Bindings list, or will it create entries for custom Binding-capable 
classes? If the answer is no customization, then I would have to connect the 
NSManagedObject instance to the controller in code.

— 
Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT mac DOT com 

_______________________________________________

Cocoa-dev mailing list ([email protected])

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

This email sent to [email protected]

Reply via email to