[Squeakland] [Q] E-Toy: How to hook a button to other object

Young-Jin Lee youngjin.michael at gmail.com
Sat Mar 3 17:18:27 PST 2007


Hi,

I am a newbie and trying to learn how to develop educational material
using E-Toy.
I went through several E-toy project, but still need some helps.

In the test program I was writing, I put a few text objects and a
Button object from "Supplies" tab. My object was to change the text of
one of the text objects when the Button is clicked.

First, I opened a Viewer for the Button object to figure out what
kinds of things I can do to this Button object. I expected to find a
method that will be invoked when the button object is clicked. To my
surprise, there is no such method.

I was able to achieve the goal by (1) creating a script to change the
text of one of the text objects and (2) creating "Button to fire to
this script". But, I don't think this method is in sprite of Squeack,
visual programming. I want to first create a button and make this
button change the text of one of the text objects when this button is
clicked, not the other way around. To me, this approach is in line of
Squeak's philosophy.

Can any one please explain what I have missed?

Thanks in advance.

Young-Jin


More information about the Squeakland mailing list