Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!NORUNIX.BITNET!knut-skog%rglab.uit.uninett From: knut-skog%rglab.uit.uninett@NORUNIX.BITNET (Knut Skog) Newsgroups: comp.windows.news Subject: Class vars or Instance vars Message-ID: <93*knut-skog@rglab.uit.uninett> Date: 7 Mar 89 05:08:46 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 25 After a close inspection of the elegant implementation of classes and message-pasing by the rutines in class.ps I am unable to see the reason for the distinction made between instance- and class-vars in the definition of the LiteWindow class . I would have put several of the class vars (f.i. FrameLabel, PaintClient, etc) as instance vars. In effect that is what happens when a { /FrameLabel () def} is sent to some window instance. The definition is added to the instance and since the instance is currentdict when the message is executed, this definition overrules definitions in its parent class as long as the keys are the same. (Using store insted of def would be rather bad style of programming) Installing attributes of this type as class-vars reduces generality. Despite the "lite/play" nature of this class I wonder if someone close to its design will comment on this issue. Have I missed out some esential part of the nature of instance and class properties? Much obliged. Knut