dynamically adding value transformer
dynamically adding value transformer
- Subject: dynamically adding value transformer
- From: David Alter <email@hidden>
- Date: Tue, 3 Apr 2007 13:57:33 -0700
I'm dynamically creating some buttons and then settup their bindings.
This is all working great. Now I have a button where I need to add a
Value Transformer. It is my understanding this needs to be added as
part of the options for the bind:toObject:withKeyPath:options:
method. I'm unclear what needs to be in this options dictionary for
this to work.
Here is what I was doing. If the "info" method returns nil I want
"myButton" to be disabled. The code is listed below.
NSDictionary * options = [NSDictionary
dictionaryWithObject:NSValueTransformerNameBindingOption forKey:
NSIsNotNilTransformerName];
[myButton bind:@"enabled" toObject:self withKeyPath:@"info"
options:options];
Thank you for the help
-dave
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden