Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

saving an object reference



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.