Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Non-standard attributes - avoid warning from data model compiler?



On May 31, 2005, at 5:41 PM, Dan Messing wrote:
Or remove the transient attribute, which I believe will only break undo/redo, which you would then have to implement yourself for the custom attribute. I'm no authority on the subject though, so someone please correct me if I'm wrong here.

A transient attribute will not break undo/redo. In fact, the main reason to use a transient attribute is to have an attribute that isn't persistent but is nonetheless managed.


One use for a transient attribute is to represent a value type (class) that Core Data doesn't natively support — such as NSColor or one of your own value classes — and use a persistent attribute as "backing store" for it. Another use is for a derived attribute that you want to appear in your model, because you have code that walks your model, or because you want to drop your entity on IB to generate an interface or a controller. In the former case you'd get undo/redo support for your attribute, in the latter it would be effectively read-only.

  -- Chris

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >Re: Non-standard attributes - avoid warning from data model compiler? (From: Dan Messing <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.