[Etoys] EToys question -- clearly I'm missing some key concept

Steven Greenberg greenbes at puzzlingevidence.net
Tue Jan 23 13:01:52 EST 2007


Hi.  I would like to use EToys for a project but I'm having a hard time
adding my own actions.  I suspect that I am missing something obvious, and
would appreciate any pointers you could offer.  I've tried to RTFM, but I
can't find the FM so I'm kind of stuck.

So... As a test case, I decided that I would make some simple methods to
animate the opacity of a Morph.  I also wanted to add an instance variable
and manipulate it.

So I created a subclass of Morph and, on the class side, added:

additionsToViewerCategories

    ^ #(
        (#seg
            ( (slot grink  'grink is a nonsense variable' String  readWrite
Player getGrink  Player  setGrink:)
                (command changeOpacityLevel: 'change the opacity level'
Player) )))

and I created #getGrink, #setGrink:, and #changeOpacityLevel: on the new
subclass of Morph.

When I instantiate the new object and open an etoys viewer, the "seg"
category is there but it is empty.

I'm running the latest Squeak 3.9 image on a Mac, downloaded form squeak.org
.

Suggestions?

    Regards,
    Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.laptop.org/pipermail/etoys/attachments/20070123/773621b1/attachment.html


More information about the Etoys mailing list