[Newbies] Squeak/eToys manual?

Milan Zimmermann milan.zimmermann at sympatico.ca
Sat Jul 8 18:49:18 UTC 2006


John,

Based on Bert's description I created a small "tutorial"

How to Make an Object (for example MyCurve) Act as Button?

0) Drag out a curve from Supplies, name it MyCurve
1) Show Viewer on MyCurve
2) In Viewer, go to scripts, drag out "emptyScript"
3) Pust some code in the script, e.g. drag out "basic->Make Sound Croak"
4) Click at the oval to the right of the "clock" on the script, select 
"mouseUp"
5) Now when you click on MyCurve, it croaks

The above is one way. Another way is to click on MyCurve and show it's hallo, 
and select from menu:

extras-->add mouseUp action and put a code there like:

self beep: 'coyote'

Milan

On 2006 July 8 11:37, Bert Freudenberg wrote:
> The script'ts trigger is set to "normal" initially (the menu button
> right of the clock), meaning the script executes when it is
> explicitly called from another script. But you can chage the trigger
> by clicking that button and set it to ticking, mouseDown etc.
>
> - Bert -
>
> Am 08.07.2006 um 13:31 schrieb John Kershaw:
> > I'm with you as far as 'script's trigger' - where do I find that? I
> > can click the menu next to the script and drag out a 'button to
> > fire this script' but nothing about mouseDown.
> >
> > John.
> >
> > On 08/07/06, Bert Freudenberg <bert at impara.de> wrote: Am 08.07.2006
> >
> > um 11:52 schrieb John Kershaw:
> > > Thanks for that. Can anyone tell me how to make an object act like
> > > a button?
> >
> > Make a script for your object and set the script's trigger to
> > mouseDown.
> >
> > - Bert -
>
> _______________________________________________
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/beginners


More information about the Beginners mailing list