I would recommend against this approach (saving the predicateFormat string) if
you care about the internal structure of the predicate (and I think in this
case, you might).
If you have a predicate editor, with the outermost (topmost) predicate being
the compound predicate row (any/all/none of t
If it's still of use, I did this with predicateWithFormat: and -description
wrapped up in a NSValueTransformer subclass. In other words I store a string
representation in the core-data model. I don't know if this is always valid,
but it works well for the predicates in my app.
Martin
-
;s it, all done.
This works as expected for me.
Martin
On 2010-10-17, at 11:01 AM, cocoa-dev-requ...@lists.apple.com wrote:
> Subject: Re: Store NSPredicate in Core Data
> To: Cocoa Dev
> Message-ID: <95528f90-6748-425c-9cb4-7fd45ce2a...@myrvold.org>
> Content-Type: text/
After some thought I found out that I can use NSkeyedArchiver and
NSKeyedUnarchiver to make an NSData and back to NSPredicate instance. Then it
is possible to store NSData into Core Data.
Den 17. okt. 2010 kl. 12.48 skrev Ivan C Myrvold:
> I am building an application where I am using an NSPre
I am building an application where I am using an NSPredicateEditor. Now I would
like to store the resulting NSPredicate from the NSPredicateEditor in Core
Data. I am not sure how to accomplish that.
I was thinking about using NSCoder, but not sure how to use NSCoder for this as
it usually is use