I'm having trouble using an NSValueTransformer. Suppose I have an
NSArrayController foo. If I bind a label's value to selection.number
(which is an NSNumber) on foo, then this is fine. However, I'm having
trouble when it comes to transforming this value.
Suppose I have a second NSArrayController bar, whose content array
binding is set to selection.number on foo, but with an
NSValueTransformer transforming it into an NSArray. However, once I
try to test this out, I get a crash, with this:
*** Terminating app due to uncaught exception 'NSUnknownKeyException',
reason: '[<NSTableView 0x12a180> valueForUndefinedKey:]: this class is
not key value coding-compliant for the key number.'
Two perplexing this come to mind: the only NSTableView I have is for a
table whose columns are bound to foo (arrangedObjects.number), which
works normally without the binding on bar. Second, I fail to see why
the binding on bar fails when the binding on the label works. The
only thing I can think of is that there is an array key expected where
only a single key was given. Why is this, and how can I solve this?
_______________________________________________
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]