• 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
Re: Value transformer in NSPredicate?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Value transformer in NSPredicate?


  • Subject: Re: Value transformer in NSPredicate?
  • From: "John R. Timmer" <email@hidden>
  • Date: Wed, 11 Apr 2007 16:26:45 -0400

Have you considered making a transient value that simply produces the transformed value on demand? That way, you could both bind to it and filter based on it, and never actually have to create a value transformer. Just make sure to send a "did/willChangeValueforKey message for both the transient and regular key when you update the value of the regular key.

JT

On Apr 10, 2007, at 3:13 PM, Justin Hawkwood wrote:

I created a NSValueTransformer (basically: float * 100 = int, and vice versa) which is used in the NIB file to transform the value in a Core Data bound table column. This works well, but I would like to use the transformer in a filter predicate which I am creating programatically, but I cannot figure out how to call the transformer to edit the value before comparing it.



____________________________________ Science Writer Ars Technica - http://arstechnica.com/journals/science.ars Wellcome Science - http://www.wellcome.ac.uk/wellcomescience



_______________________________________________

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


References: 
 >Value transformer in NSPredicate? (From: Justin Hawkwood <email@hidden>)

  • Prev by Date: RE: WM_KEYDOWN
  • Next by Date: Re: init method of NSObjectController subclass
  • Previous by thread: Value transformer in NSPredicate?
  • Next by thread: stroke and fill - logs CGContextSetFillColorWithColor invalid context
  • Index(es):
    • Date
    • Thread