Why would I want to have a non-standard attribute?

Posted by dontWatchMyProfile on Stack Overflow See other posts from Stack Overflow or by dontWatchMyProfile
Published on 2010-06-07T10:50:19Z Indexed on 2010/06/13 15:52 UTC
Read the original article Hit count: 170

Filed under:
|

The documentation on Core Data entities says:

You might implement a custom class, for example, to provide custom accessor or validation methods, to use non-standard attributes, to specify dependent keys, to calculate derived values, or to implement any other custom logic.

I stumbled over the non-standard attributes claim. It's just a guess: If my attribute is anything other than NSString, NSNumber or NSDate I will want to have a non-standard Attribute with special setter and getter methods? So, for example, if I wanted to store an image, this would be a non-standard Attribute with type NSData and a special method, say -(void)setImageWithFileURL:(NSURL*)url which then pulls the image data from the file, puts in in an NSData and assigns it to core data?

Or did I get that wrong?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about core-data