Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!rice!uw-beaver!fluke!ssc-vax!bcsaic!dans From: dans@bcsaic.UUCP (Dan Small) Newsgroups: comp.lang.smalltalk Subject: Re: super super ? Message-ID: <17720@bcsaic.UUCP> Date: 6 Dec 89 00:19:17 GMT References: <2160@cs-spool.calgary.UUCP> <81699@linus.UUCP> Reply-To: dans@bcsaic.UUCP (Dan Small) Organization: Boeing Computer Services AI Center, Seattle Lines: 22 In article <81699@linus.UUCP> bwk@mbunix.mitre.org (Barry Kort) writes: > >Write a class method for Class1 called foo as follows: > > foo > self new foo. > >Then call "Class1 foo" directly. Simple, no? > >--Barry Kort I must disagree that this approach satisfies the original poster's problem. The original requirement, as I interpreted it, was for an instance of Class3 to implement the instance method 'foo' as defined in Class1. The approach presented above causes a new instance of Class1 to implement the 'foo' method. There is a BIG difference. Specifically, if 'foo' requires access to the values of instance variables in the instance of Class3, then the above is useless. The context in which 'foo' is intended to be executed is lost when you execute it in the scope of the new instance of Class1, rather than the original instance of Class3. Dan Small, Boeing Computer Services