saving an object reference
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