[Newbies] invoking a *class* method from a workspace
Bert Freudenberg
bert at freudenbergs.de
Sat May 26 14:06:23 UTC 2007
On May 26, 2007, at 14:50 , mstram wrote:
> What's the trick / catch ... if there is one for invoking a class
> method from
> a workspace?
"Class methods" in Smalltalk are regular methods, because classes are
regular objects. Unfortunately the browser gives the impression that
there are two kinds of methods ...
MyClass new
simply sends #new to the object MyClass. This is how you invoke a
"class method".
Remember, anything in Smalltalk is an object. Even classes. There is
not even a "syntax" to define a class or a method (just like there is
no syntax for control structures). Everything is accomplished by
sending messages.
- Bert -
More information about the Beginners
mailing list