• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Manual Cocoa Binding - Custom Value Transformer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Follow-Ups:
    • Re: Manual Cocoa Binding - Custom Value Transformer
      • From: "b.bum" <email@hidden>
    • Re: Manual Cocoa Binding - Custom Value Transformer
      • From: mmalcolm crawford <email@hidden>
  • Prev by Date: Re: Cocoa Bindings Question(s)
  • Next by Date: AppleScript framework: architecture proposal
  • Previous by thread: Re: How do I set focus on a specific view
  • Next by thread: Re: Manual Cocoa Binding - Custom Value Transformer
  • Index(es):
    • Date
    • Thread