Re: Value Transformer Name
Re: Value Transformer Name
- Subject: Re: Value Transformer Name
- From: Quincey Morris <email@hidden>
- Date: Fri, 10 Apr 2009 10:54:36 -0700
On Apr 10, 2009, at 09:57, Richard Somers wrote:
The documentation indicates NSKeyedUnarchiveFromDataTransformerName
supports reverse transformation. Single class with bidirectional
transformation. Use –transformedValue: to go one way and –
reverseTransformedValue: to go the other way.
Er, I already know this. You missed my point.
To archive the value of a transformable attribute (i.e. to create its
NSData representation), Core Data runs a custom transformer in the
forward direction, but it runs the default transformer in the reverse
direction.
Therefore, if you specify the value of
NSKeyedUnarchiveFromDataTransformerName as a custom transformer (as
you apparently did), Core Data will run it in the "wrong" direction,
producing errors (as you apparently saw). That's why your case #3
didn't work.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden