Re: Store NSPredicate in Core Data

2010-10-17 Thread Dave DeLong
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

Re: Store NSPredicate in Core Data

2010-10-17 Thread Martin Hewitson
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 -

Re: Store NSPredicate in Core Data

2010-10-17 Thread Martin Stanley
;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/

Re: Store NSPredicate in Core Data

2010-10-17 Thread Ivan C Myrvold
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