Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!decwrl!argosy!becher From: becher@argosy.UUCP (Jonathan D. Becher) Newsgroups: comp.lang.smalltalk Subject: Re: need explanation of 'super class' Keywords: super, class, meaning Message-ID: <182@argosy.UUCP> Date: 17 Jul 89 18:13:54 GMT Sender: news@argosy.UUCP Organization: we donna need no steekin' organeezation Lines: 20 In article <180@argosy.UUCP>, I write: > Suppose I have two classes, Building and Shack, where Shack is derived from > Building. Both Building and Shack have class methods called size. ... > Shack methodsFor: 'test' > tester > Transcript print: self class size. "prints 5" > Transcript print: super class size. "prints 5 also" > > Why does the second one print 5 and not 10? Whoops! I was making (as the Blue book describes it) the classic mistake in understanding super. Things work fine if I change the second Transcript line to: Transcript print: self superclass size. Jon Becher argosy!becher@decwrl.dec.com "It takes a big man to admit his mistakes. I'm not a big man."