Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!boulder!gore!jacob From: jacob@gore.com (Jacob Gore) Newsgroups: comp.sys.next Subject: Re: Multiple instantiation of windows laid out with IB Message-ID: <130031@gore.com> Date: 23 Oct 89 20:53:12 GMT References: <130030@gore.com> Reply-To: jacob@gore.com (Jacob Gore) Organization: Gore Enterprises Lines: 28 / comp.sys.next / ed@uunet!dtgcube (Edward Jung) / Oct 22, 1989 / #import id copyObject(id baseObject) { id returnValue; int length; char * buffer = NXWriteRootObjectToBuffer(baseObject, &length); returnValue = NXReadObjectFromBuffer(buffer, length); /* error checking here */ NXFreeObjectBuffer(buffer, length); return returnValue; } This writes out a graph of the object and then reads it back in, all in memory. ---------- Thanks, this is a nice way to copy an object. (Looks like NeXT punted on the -deepCopy method in class Object?) However, it seems that it does not preserve the outlet connections that have been set up in the interface builder. Jacob P.S. Thanks to everybody who pointed me to Example 4 in the Interface Builder chapter of the 1.0 manual. -- Jacob Gore Jacob@Gore.Com boulder!gore!jacob