Classes in eToys

hjh-sqlist at lexdb.net hjh-sqlist at lexdb.net
Wed Dec 22 10:15:16 UTC 2004


Quoting Blake <blake at kingdomrpg.com>:

> Is there any way to go from the prototype you build as an eToy to a  
> genuine class?
> 
The answer is 'No'.

Not easy at least. Or perhaps it doesn't make much sense. Because that is not
the general idea behind EToys. It was a deliberate reduction of concepts to
find out what is still possible.
Etoys is instance based. Every instance gets it's own singleton class - a
subclass of Player is generated which contains the code of the scripts which
you develop with the tiles.
(It is not meant that people should work with that directly but of course you
can experiment with that. The classes/methods are named like
Player56>>script1).


Hannes



P.S. However the question is of course very interesting. The idea is to work
with an object (add methods etc.) and then generalize. This is basically what
some Smalltalkprogrammers are doing all the time.


Create a class (only the name and some instance variables and empty methods with
'self halt' in it.
Create an object of that class and open a instance browser on it.
Query the object and fill in the code as you go along.


There is a thesis which might be intersting to read
www.nakedobjects.org/downloads/thesis.pdf 

And of course the recently announced SRE tools by Trygve Reenskaug are surely
interesting. It contains a tool which combines inspector and method browser. So
you directly work with instances.










More information about the Squeak-dev mailing list