Path: utzoo!attcan!uunet!dalcs!aucs!831059l From: 831059l@aucs.UUCP (Langlois) Newsgroups: comp.lang.smalltalk Subject: Duplication of instance variables in subclasses Message-ID: <1397@aucs.UUCP> Date: 26 Nov 88 19:24:34 GMT Reply-To: 831059l@aucs.UUCP (Langlois) Distribution: na Organization: School of Computer Science, Acadia Univ., Nova Scotia Lines: 20 Is it possible to define a subclass that just adds some new methods (and possibly some new instance variable of its own) to its superClass but does not duplicate the instance variables of the superClass so that the new methods access the superClass variables and not the subClass's inheritance of the variable? My specific application is the development of a simulation system. If I define a class Simulation with an eventQueue and a current time and want to define a subClass Entity (objects of a simulation) but I want Entity to access class Simulation's eventQueue and if possible, have no eventQueue instance variable. Is my only option defining the two class as subClasses of Object (or another class) so that instances of Entity don't have an eventQueue. Thanks for you time. Steven Langlois UUCP: {uunet|watmath|utai|garfield}!dalcs!aucs!831059l Acadia University BITNET: Steven@Acadia Wolfville, NS Internet: Steven%Acadia.BITNET@CUNYVM.CUNY.EDU CANADA B0P 1X0