KVO or Value Transformer?
KVO or Value Transformer?
- Subject: KVO or Value Transformer?
- From: Trygve Inda <email@hidden>
- Date: Thu, 02 Apr 2009 18:53:17 +0000
- Thread-topic: KVO or Value Transformer?
I need to enable a view if the value of a popup menu is kSomeValue or
kSomeOtherValue, and disable it otherwise.
The popup's value is bound to an NSNumber in a NSDictionary.
I think I could add an observer for this and manually enable/disable the
view when the popup value meets my criteria...
or
I could use a custom value transformer that returns a Boolean and convert
kSomeValue and kSomeOtherValue to YES, everything else to NO and bind the
enabled state directly to the popup value, with the transformer.
Which is the better way?
Thanks,
Trygve
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden