Value Transformers (was Cocoa Bindings - many people using them?)
Value Transformers (was Cocoa Bindings - many people using them?)
- Subject: Value Transformers (was Cocoa Bindings - many people using them?)
- From: Óscar Morales Vivó <email@hidden>
- Date: Fri, 21 May 2004 19:38:35 -0400
I have created (and used and tested) some general use value transformer
classes, including useful floating point operations and a value
transform composer. Pretty slick IMHO ;o). If there's demand I can post
them on the net with a BSD like license.
On 21 May 2004, at 18:45, Jim Hagen wrote:
On May 21, 2004, at 1:18 PM, Steve Sims wrote:
There's a few slightly limitations though. Whilst you can put a list
of parameters for "enabled" or "hidden" I believe (if memory serves)
this list is logically ANDed - i would have liked to be able to
enable on one condition OR another. There's probably a way around
this limitation though using value transformers. Bindings also (for
text fields at least) don't
A "NSNegateBoolean" transformer ( one of the three built-in
transformers ) will give you "NOT foo", so you could construct a
similar logical statement, though it might get a little tricky.
Creating an "isFooEnabled" boolean in your model and binding the
visible/editable parameters to that works well when using multiple
other booleans doesn't. Such a boolean might make sense for your data
model anyway if there's such a dependancy. I always try to think about
making non-UI-based use of the model objects; knowing if you can
successfully invoke a method can be important thing even when there's
no UI.
_______________________________________________
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.