• 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: Core data transformer direction
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core data transformer direction


  • Subject: Re: Core data transformer direction
  • From: mmalc crawford <email@hidden>
  • Date: Wed, 02 Jul 2008 23:37:39 -0700


On Jul 2, 2008, at 10:15 PM, Quincey Morris wrote:

... Core Data uses an instance of NSValueTransformer to convert the attribute to and from an instance of NSData. Core Data then stores the data instance to the persistent store. By default, Core Data uses the NSKeyedUnarchiveFromDataTransformerName transformer, however you can specify your own transformer if you want.
... If you specify a custom transformer, it must transform an instance of the non-standard data type into an instance of NSData and support reverse transformation.
The first paragraph (and the description of NSKeyedUnarchiveFromDataTransformerName) says that the forward transformation is NSData->SomeClass.
The second paragraph says that the forward transformation is SomeClass->NSData.


It's not clear in what way the first paragraph "says that the forward transformation is NSData->SomeClass" -- it states that the transformer is used "to convert the attribute to and from an instance of NSData" -- at worst it's ambiguous. The second paragraph makes a definite statement that is unambiguous.
See also:
<http://developer.apple.com/documentation/Cocoa/Reference/CoreDataFramework/Classes/NSAttributeDescription_Class/Reference/Reference.html#//apple_ref/doc/uid/TP30001175-SW3 >


mmalc

_______________________________________________

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


  • Follow-Ups:
    • Re: Core data transformer direction
      • From: Quincey Morris <email@hidden>
References: 
 >Core data transformer direction (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: Core data transformer direction
  • Next by Date: NSProgressIndicator thread safe?
  • Previous by thread: Re: Core data transformer direction
  • Next by thread: Re: Core data transformer direction
  • Index(es):
    • Date
    • Thread