• 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
NSManagedObject Copy and Paste
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSManagedObject Copy and Paste


  • Subject: NSManagedObject Copy and Paste
  • From: Mike Burns <email@hidden>
  • Date: Sat, 29 Mar 2008 20:52:47 -0400

I have a question regarding implementing copy and paste with NSManagedObjects--

I've read through the NSPersistentDocument copy and paste tutorial, but my situation is a bit more involved then just copying and pasting an employee first and last name. Without getting too involved, this is the general set up:

The root object that is being copied is called WBCell. WBCell has a name and some other standard attributes, and then it has a one-to-one relationship with another managed object (WBScene). The scene object has some standard attributes and then a one-to-many relationship with what could potentially be several additional managed objects (WBGraphicElements), each of which has several standard and non- standard attributes (bounds, color, etc.).

Is the best way to go about this by creating a dictionary representation with copy keys (as outlined in the NSPersistentDocument tutorial) of each of these managed objects, and then saving an array of dictionaries for each managed object (WBCell, WBScene and all of the WBGraphicElements) that is going to be copied? I don't see any other way, but I wanted to make sure before I began implementing this...

Thanks!
Mike
_______________________________________________

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


  • Prev by Date: How to interrupt a long loop with command-period?
  • Next by Date: Re: How to interrupt a long loop with command-period?
  • Previous by thread: Re: How to interrupt a long loop with command-period?
  • Next by thread: re: NSManagedObject Copy and Paste
  • Index(es):
    • Date
    • Thread