Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!usc!ucsd!pacbell.com!pacbell!hoptoad!farcomp!murat From: murat@farcomp.UUCP (Murat Konar) Newsgroups: comp.sys.mac.programmer Subject: Re: WindowObject in Object Pascal Message-ID: <279@farcomp.UUCP> Date: 6 Nov 90 18:27:50 GMT References: <311@rusux1.rus.uni-stuttgart.de> Reply-To: murat@farcomp.UUCP (Murat Konar) Organization: Farallon Computing Inc. Berkeley, CA Lines: 13 [ someone wants to define an object that represents a window in Object Pascal ] If I understand the problem correctly, given a window ptr, you want to to get to the window object. You can do this by stuffing a reference to the window object in the window record's refCon field. MacApp does something like this. You must be careful not to assume that whatever the refCon points to is infact an object (i.e. you must test it for objectness) since there may be windows with non-nil refcons that point to other things. -- ____________________________________________________________________ Have a day. :^| Murat N. Konar murat@farcomp.UUCP -or- farcomp!murat@apple.com