Simple Morphs (correction)
Philippe de Rochambeau
pr1 at club-internet.fr
Tue Apr 28 11:00:52 UTC 1998
Dietmar Krueger wrote:
>
> >
> >It only takes 30 seconds:
> >-Open an empty morphic world.
> >-Add a TextMorph and a SimpleButtonMorph
> >-Place the SimpleButtonMorph above the TextMorph!!!
> >-Choose the following from the popup menu of the SimpleButtonMorph:
> >--set target
> >--change action selector (type in: contents)
> sorry, a small correction:
> --change action selector (type in: contents:)
> >--change arguments (type in: 'Hello World')
> >-Press the button
> >
> >Greetings,
> >Dietmar
Many thanks Dietmar. It works!
Now, do I need to subclass SimpleButtonMorph everytime I want to change its
label, its target, etc? If I plan to have 10 different buttons in my window,
do I need to create ten different subclasses of SimpleButtonMorph?
How do you target several targets; do you simply drop the button on the
various targets?
How do you give several selectors to a Morph? For instance, how do you tell
the ButtonMorph to go fetch the contents of a TextMorph and put them in a
particular StringMorph?
Do I need to give my TextMorph a name for the ButtonMorph to be able to get
its contents before transferring them to the StringMorph?
Vielen Dank.
Philippe de Rochambeau
More information about the Squeak-dev
mailing list
|