• 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: Non-standard attributes - avoid warning from data model compiler?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Subject: Re: Non-standard attributes - avoid warning from data model compiler?
  • From: Dan Messing <email@hidden>
  • Date: Wed, 1 Jun 2005 12:08:18 -0500

Unless I'm missing something, we're actually saying the same thing, right? I guess my question is this: does adding a transient attribute for a non-standard (say, an NSRect) attribute provide any functionality beyond automatic undo/redo support?


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.

_______________________________________________ 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
  • Follow-Ups:
    • Re: Non-standard attributes - avoid warning from data model compiler?
      • From: Chris Hanson <email@hidden>
  • Prev by Date: Custom NSTextField subclass and wrapping
  • Next by Date: Re: Non-standard attributes - avoid warning from data model compiler?
  • Previous by thread: Custom NSTextField subclass and wrapping
  • Next by thread: Re: Non-standard attributes - avoid warning from data model compiler?
  • Index(es):
    • Date
    • Thread