Manual Cocoa Binding - Custom Value Transformer
Manual Cocoa Binding - Custom Value Transformer
- Subject: Manual Cocoa Binding - Custom Value Transformer
- From: Jonathan Younger <email@hidden>
- Date: Fri, 16 Jul 2004 23:09:00 -0700
When manually binding a control how can I also bind my custom value
transformer?
I've tried:
NSMutableDictionary *bindingOptions = [NSMutableDictionary dictionary];
[bindingOptions setObject:@"MyCustomValueTransformer"
forKey:@"NSValueTransformerName"];
[myControl bind:@"value" toObject:arrayController
withKeyPath:@"selection.optionValue" options:bindingOptions];
and also:
MyCustomValueTransformer *transformer = [[MyCustomValueTransformer
alloc] init];
NSMutableDictionary *bindingOptions = [NSMutableDictionary dictionary];
[bindingOptions setObject: transformer
forKey:@"NSValueTransformerName"];
[myControl bind:@"value" toObject:arrayController
withKeyPath:@"selection.optionValue" options:bindingOptions];
The error returned for either of these examples is: Cannot find value
transformer with name MyCustomValueTransformer
Has anyone manually bound a control with a custom value transformer and
if so what do I need to do?
Thanks in advance,
Jonathan
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.