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

-----------------------------
Martin Hewitson
AEI Hannover
-----------------------------

On 17 Oct 2010, at 14:18, Ivan C Myrvold <i...@myrvold.org> wrote:

> 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 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 used to archive directly to disk and not with Core Data.
>> 
>> Do anyone have any hint?
>> 
>> _______________________________________________
>> 
>> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>> 
>> Please 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:
>> http://lists.apple.com/mailman/options/cocoa-dev/ivan%40myrvold.org
>> 
>> This email sent to i...@myrvold.org
>> 
> 
> 
> _______________________________________________
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please 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:
> http://lists.apple.com/mailman/options/cocoa-dev/martin.hewitson%40aei.mpg.de
> 
> This email sent to martin.hewit...@aei.mpg.de
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please 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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to