• 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: MVC, storing VIEW-specific information and core data
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MVC, storing VIEW-specific information and core data


  • Subject: Re: MVC, storing VIEW-specific information and core data
  • From: "I. Savant" <email@hidden>
  • Date: Mon, 9 Mar 2009 14:52:42 -0400

On Mon, Mar 9, 2009 at 1:49 PM, Karolis Ramanauskas <email@hidden> wrote:

> I have Core Data Document Based app. Core Data
> model contains entities that describe graph objects (nodes).
...
> Of course I should be able to
> drag them around the screen all that stuff. But this is purely user
> interface stuff I don't want the model to change because I drag stuff
> around. What is the best way to store the coordinates, colors, all that UI
> stuff using core data? I really don't want to put extra entities within my
> .xcdatamodel file that deal purely with UI stuff.

  It's not entirely clear whether you mean to say that the
coordinates, colors, etc. are ever persisted at all.

IF PERSISTED

  What's your aversion to storing this within the nodes themselves? If
they're meant to be persisted at all, and these properties belong to
your Node instances, then there's no obvious reason (from your
description) to create a separate entity to store them. What's the
problem? Be specific.


IF NOT PERSISTED

  Your Node entity, by default, uses the NSManagedObject class. This
can be subclassed. Just because your NSManagedObject subclass provides
the ability to managed / persist data with Core Data doesn't mean all
its properties have to be persisted. This is well-covered in the
documentation. Questions? Again be specific. :-)

--
I.S.
_______________________________________________

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

References: 
 >MVC, storing VIEW-specific information and core data (From: Karolis Ramanauskas <email@hidden>)

  • Prev by Date: Re: iPhone book recommendations
  • Next by Date: Re: MVC, storing VIEW-specific information and core data
  • Previous by thread: Re: MVC, storing VIEW-specific information and core data
  • Next by thread: Re: MVC, storing VIEW-specific information and core data
  • Index(es):
    • Date
    • Thread