Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!shadooby!samsung!cs.utexas.edu!husc6!spdcc!merk!alliant!linus!mbunix!bwk From: bwk@mbunix.mitre.org (Kort) Newsgroups: comp.lang.smalltalk Subject: Re: super super ? Summary: Just give it a unique name. Message-ID: <81699@linus.UUCP> Date: 3 Dec 89 20:45:39 GMT References: <2160@cs-spool.calgary.UUCP> Sender: news@linus.UUCP Reply-To: bwk@mbunix.mitre.org (Barry Kort) Organization: The MITRE Corp. Bedford, MA Lines: 39 In article <2160@cs-spool.calgary.UUCP> sharp@ksi.cpsc.ucalgary.ca (Maurice Sharp) writes: > Does anyone know the solution to the following problem. Assume > that there are 3 classes each of which implements a message called > foo. Call the classes Class1, Class2 and Class3, where each is a > subclass of the other, i.e. : > Object > Class1 > Class2 > Class3 > The message 'foo' is defined in all three classes. Let us say > that Class1 defines it as follows ; > foo > Transcript cr; show: 'Class1'; cr > Class2 defines foo as : > foo > Transcript cr; show: 'Class2'; cr. > super foo > THE PROBLEM : > I want Class3 to call the foo of Class1 NOT Class2. Is there a > way to do this ? Write a class method for Class1 called foo as follows: foo self new foo. Then call "Class1 foo" directly. Simple, no? --Barry Kort