Re: Non-standard attributes - avoid warning from data model compiler?
Re: Non-standard attributes - avoid warning from data model compiler?
- Subject: Re: Non-standard attributes - avoid warning from data model compiler?
- From: Chris Hanson <email@hidden>
- Date: Tue, 31 May 2005 23:29:36 -0700
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:
This email sent to email@hidden