• 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
Conditional NSValueTransformer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: KVO, design and documentaion
  • Next by Date: NSTreeController doesn't notice insertion
  • Previous by thread: Re: How to add an managedObject to an arrayController and inherit from a superentity ?
  • Next by thread: Re: Conditional NSValueTransformer
  • Index(es):
    • Date
    • Thread