[BUG]UndefinedObject(Object)>>error:
Andreas Raab
andreas.raab at gmx.de
Mon Oct 13 19:06:26 UTC 2003
Hi Ned,
> There are two things named 'Bar': the global class, and the Foo class
> variable.
>
> In Foo class, returnBar returns the class variable Bar.
>
> In FooSub class (which is a subclass of Foo), returnBar
> returns the global Bar, rather than the Foo class variable.
Thanks - if that isn't making Tim's point then nothing is ;-) I pasted the
code, run it, looked at it in the browser and was immediately convinced that
the result is entirely correct. Obviously, if you look at FooSub[class] and
have Bar right next to it in the browser you wouldn't possibly guess that
FooBase may have a class variable that shadows Bar.
Boy, what a mess. This should be prevented At All Costs (tm).
Cheers,
- Andreas
More information about the Squeak-dev
mailing list
|