• 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
saving an object reference
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

saving an object reference


  • Subject: saving an object reference
  • From: James Maxwell <email@hidden>
  • Date: Thu, 27 Dec 2007 10:28:16 -0800

I'm trying to work out how to save an object which references another type of object. Basically, I have one object, objectA, which uses a subclass of itself, objectB, to get information about its position on the page. So objectA always holds a reference to a given objectB instance, and figures out its position based on that instance. This is a recent addition, and it seems to have broken saving and undo in my app, which is basically because I've no idea how to save an object reference...
The system used for saving is just to put all of the 'vital statistics' of my objectA (and objectB, as well, since it's just a subclass) into an NSMutableDictionary, then write the dict to disk. Reading then just reads/parses the dict and re-builds the original objectA.


But how do I store a reference (pointer) to an existing object in a dictionary?

J.
_______________________________________________

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


  • Follow-Ups:
    • Re: saving an object reference
      • From: "I. Savant" <email@hidden>
    • Re: saving an object reference
      • From: Mike Abdullah <email@hidden>
  • Prev by Date: NSPrintInfo will not accept paper format wider than high?
  • Next by Date: Re: saving an object reference
  • Previous by thread: Re:NSPrintInfo will not accept paper format wider than high?
  • Next by thread: Re: saving an object reference
  • Index(es):
    • Date
    • Thread