total newbie to Squeak
tjfahey at yahoo.com
Thu Feb 25 22:43:21 UTC 1999
Benjamin Shults wrote:
> I can write methods in Squeak to extend the behavior of
> existing objects. Does the Squeak GUI provide a similar
> way to write new classes from scratch (inheriting from
> an existing class, of course?)
Just take the sample class "template" that you see in the
SystemBrowser when you select a class category (this one happened to
be the category named 'Network-Protocols'):
Object subclass: #NameOfClass
instanceVariableNames: 'instVarName1 instVarName2'
classVariableNames: 'ClassVarName1 ClassVarName2'
Change 'NameOfClass' to some new class name that doesn't exist in the
system, change the instVarName1... and ClassVarName1... names to
whatever you want (or delete them). Then choose 'accept' from the
popup menu and, voila', you have a new class. BTW, you can also change
'Object' to whatever superclass you want to use, as long as it already
First Union Corporation
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com
More information about the Squeak-dev