Archiving objects without their owner[1]
Archiving objects without their owner[1]
- Subject: Archiving objects without their owner[1]
- From: Dan Bernstein <email@hidden>
- Date: Tue, 18 Dec 2001 23:19:12 +0200
What I'm trying to do is basically what (I think) AppKit does with nib
files:
I want to archive an object graph in which multiple objects point to
some "owner" object. I don't want the owner (and the graph rooted at it)
to be archived. When unarchiving, I want everything that pointed to the
"owner" to point to an object I supply.
I guess I should use [NSArchiver replaceObject:withObject:] to archive
some "dummy" "placeholder" instead of the owner when archiving. It's
just that it isn't clear when I'm supposed to do when unarchiving, in
particular - what should be the first argument to [NSUnarchiver
replaceObject:withObject:].
Thanks (again) in advance,
-- Dan Bernstein
[1] Asking a question twice worked for me before.