Conditional NSValueTransformer
Conditional NSValueTransformer
- Subject: Conditional NSValueTransformer
- From: Keith Duncan <email@hidden>
- Date: Sat, 27 Jan 2007 23:09:26 +0000
I have a CoreData entity which stores a distance float. I need to
store all distances in metric form for my calculations but I need to
allow the user to see (and enter) their distances in imperial form,
based on their preferences.
A NSValueTransformer would seem almost perfect for this task. I've
read the page on CocoaDev and found that binding to self can allow you
to return values that based on other model attributes, which is
exactly what I need. But how would this work for
reverseTransformedValue:? If the transformer is being passed self it
has no way to discover the new value?
- Keith
_______________________________________________
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