What is a parameter in etoys?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

What is a parameter in etoys?

Christine Murakami

Do you have some documentation on how parameters work in Etoys and what they can accomplish? I looked it up in your Floss manual but it was unclear to me where to find that information.

 

Thanks!

 

Christine Murakami

Technology Integration Specialist

Description: cid:image001.png@01C90D05.30E4FA40

56 S. Columbia Avenue

Columbus, OH 43209

www.columbusschoolforgirls.org

 

 


_______________________________________________
squeakland mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/squeakland
Reply | Threaded
Open this post in threaded view
|

Re: What is a parameter in etoys?

Bert Freudenberg
<base href="x-msg://11/">
On 28.03.2011, at 14:17, Christine Murakami wrote:

Do you have some documentation on how parameters work in Etoys and what they can accomplish? I looked it up in your Floss manual but it was unclear to me where to find that information.

Many tiles in Etoys have a parameter. It is a value that influences the behavior of that tile.

For example, the "forward by" tile has a parameter that specifies how far the object should move. The "make sound" parameter specifies which sound to make. Etc.

You can also make your own tiles. When you create a new script, a tile for it is placed in an object's "scripts" viewer category. That tile can be used in another script.

The "add parameter" menu entry lets you add a parameter to your own tile. If you use that new tile in another script, you can set a specific value for the parameter just like with any other tile. 

Inside the script for your tile, that parameter is shown in the title bar. It is called "number" (unless you change the parameter type). You drag this "number" tile and use it like any variable tile in that script.

E.g. in this script, I used the "number" tile four times:


Every time you use your new tile, you can give it another "concrete" value. That's why in the script itself, you only have the "abstract" value called "number". (Computer scientists call the concrete values "arguments" and the abstract values "parameters", but even programmers get confused about the distinction)


Note that after adding a parameter, you can not set your script to "ticking" anymore, because it now needs a parameter. It only gets a concrete value for the parameter from another script where your tile is used. Additionally, you can set a value in the viewer, and hit the yellow button to run your script with that value:


- Bert -


_______________________________________________
squeakland mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/squeakland
Reply | Threaded
Open this post in threaded view
|

Re: What is a parameter in etoys?

Ricardo Moran
Great explanation! I didn't know the difference between "arguments" and "parameters" :)
BTW, is this written somewhere? It would be cool to add it to the manual...


On Mon, Mar 28, 2011 at 10:02 AM, Bert Freudenberg <[hidden email]> wrote:
On 28.03.2011, at 14:17, Christine Murakami wrote:

Do you have some documentation on how parameters work in Etoys and what they can accomplish? I looked it up in your Floss manual but it was unclear to me where to find that information.

Many tiles in Etoys have a parameter. It is a value that influences the behavior of that tile.

For example, the "forward by" tile has a parameter that specifies how far the object should move. The "make sound" parameter specifies which sound to make. Etc.

You can also make your own tiles. When you create a new script, a tile for it is placed in an object's "scripts" viewer category. That tile can be used in another script.

The "add parameter" menu entry lets you add a parameter to your own tile. If you use that new tile in another script, you can set a specific value for the parameter just like with any other tile. 

Inside the script for your tile, that parameter is shown in the title bar. It is called "number" (unless you change the parameter type). You drag this "number" tile and use it like any variable tile in that script.

E.g. in this script, I used the "number" tile four times:


Every time you use your new tile, you can give it another "concrete" value. That's why in the script itself, you only have the "abstract" value called "number". (Computer scientists call the concrete values "arguments" and the abstract values "parameters", but even programmers get confused about the distinction)


Note that after adding a parameter, you can not set your script to "ticking" anymore, because it now needs a parameter. It only gets a concrete value for the parameter from another script where your tile is used. Additionally, you can set a value in the viewer, and hit the yellow button to run your script with that value:


- Bert -


_______________________________________________
squeakland mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/squeakland



_______________________________________________
squeakland mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/squeakland
Reply | Threaded
Open this post in threaded view
|

Re: What is a parameter in etoys?

Bert Freudenberg

On 28.03.2011, at 15:58, Ricardo Moran wrote:

Great explanation! I didn't know the difference between "arguments" and "parameters" :)


BTW, is this written somewhere? It would be cool to add it to the manual...

Go ahead and add it :)

- Bert -


On Mon, Mar 28, 2011 at 10:02 AM, Bert Freudenberg <[hidden email]> wrote:
On 28.03.2011, at 14:17, Christine Murakami wrote:

Do you have some documentation on how parameters work in Etoys and what they can accomplish? I looked it up in your Floss manual but it was unclear to me where to find that information.

Many tiles in Etoys have a parameter. It is a value that influences the behavior of that tile.

For example, the "forward by" tile has a parameter that specifies how far the object should move. The "make sound" parameter specifies which sound to make. Etc.

You can also make your own tiles. When you create a new script, a tile for it is placed in an object's "scripts" viewer category. That tile can be used in another script.

The "add parameter" menu entry lets you add a parameter to your own tile. If you use that new tile in another script, you can set a specific value for the parameter just like with any other tile. 

Inside the script for your tile, that parameter is shown in the title bar. It is called "number" (unless you change the parameter type). You drag this "number" tile and use it like any variable tile in that script.

E.g. in this script, I used the "number" tile four times:

<PastedGraphic-1.png>

Every time you use your new tile, you can give it another "concrete" value. That's why in the script itself, you only have the "abstract" value called "number". (Computer scientists call the concrete values "arguments" and the abstract values "parameters", but even programmers get confused about the distinction)

<PastedGraphic-3.png>

Note that after adding a parameter, you can not set your script to "ticking" anymore, because it now needs a parameter. It only gets a concrete value for the parameter from another script where your tile is used. Additionally, you can set a value in the viewer, and hit the yellow button to run your script with that value:

<PastedGraphic-6.png>

- Bert -


_______________________________________________
squeakland mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/squeakland





_______________________________________________
squeakland mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/squeakland
Reply | Threaded
Open this post in threaded view
|

Re: What is a parameter in etoys?

Ricardo Moran
Ok, I'll do it tonight :)

On Mon, Mar 28, 2011 at 1:51 PM, Bert Freudenberg <[hidden email]> wrote:

On 28.03.2011, at 15:58, Ricardo Moran wrote:

Great explanation! I didn't know the difference between "arguments" and "parameters" :)


BTW, is this written somewhere? It would be cool to add it to the manual...

Go ahead and add it :)

- Bert -


On Mon, Mar 28, 2011 at 10:02 AM, Bert Freudenberg <[hidden email]> wrote:
On 28.03.2011, at 14:17, Christine Murakami wrote:

Do you have some documentation on how parameters work in Etoys and what they can accomplish? I looked it up in your Floss manual but it was unclear to me where to find that information.

Many tiles in Etoys have a parameter. It is a value that influences the behavior of that tile.

For example, the "forward by" tile has a parameter that specifies how far the object should move. The "make sound" parameter specifies which sound to make. Etc.

You can also make your own tiles. When you create a new script, a tile for it is placed in an object's "scripts" viewer category. That tile can be used in another script.

The "add parameter" menu entry lets you add a parameter to your own tile. If you use that new tile in another script, you can set a specific value for the parameter just like with any other tile. 

Inside the script for your tile, that parameter is shown in the title bar. It is called "number" (unless you change the parameter type). You drag this "number" tile and use it like any variable tile in that script.

E.g. in this script, I used the "number" tile four times:

<PastedGraphic-1.png>

Every time you use your new tile, you can give it another "concrete" value. That's why in the script itself, you only have the "abstract" value called "number". (Computer scientists call the concrete values "arguments" and the abstract values "parameters", but even programmers get confused about the distinction)

<PastedGraphic-3.png>

Note that after adding a parameter, you can not set your script to "ticking" anymore, because it now needs a parameter. It only gets a concrete value for the parameter from another script where your tile is used. Additionally, you can set a value in the viewer, and hit the yellow button to run your script with that value:

<PastedGraphic-6.png>

- Bert -


_______________________________________________
squeakland mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/squeakland





_______________________________________________
squeakland mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/squeakland



_______________________________________________
squeakland mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/squeakland
Reply | Threaded
Open this post in threaded view
|

Re: What is a parameter in etoys?

Ricardo Moran
Hi,

I modified the "User interface" chapter of the FLOSS manual to add Bert's explanation about parameters. I replaced the first paragraph of the old text with Bert's version. I just wanted to check with you to see if you approve this change. FYI, the old version was:

-----------------------
add parameter

This option adds a parameter to the script. The parameter is passed into the script when it is called from another script. For example if you can create a script that will move an object forward based upon the number, you can add a parameter of type number. Then call that script from one or more other scripts passing in a specific value as the number. To use the parameter in the script simply drag the parameter from the Script Editor's in the top line to the right of the scripts name into your script where any number data type can be used.

The following are the data types that can be used as parameters:

  • Boolean (true or false)
  • BorderStyle 
  • ButtonPhase
  • Color
  • Graphic
  • ImageResolution
  • Number
  • Patch
  • Point
  • ScriptName
  • Sound
  • String
  • TrailStyle 
-----------------------

On Tue, Mar 29, 2011 at 4:12 PM, Ricardo Moran <[hidden email]> wrote:
Ok, I'll do it tonight :)


On Mon, Mar 28, 2011 at 1:51 PM, Bert Freudenberg <[hidden email]> wrote:

On 28.03.2011, at 15:58, Ricardo Moran wrote:

Great explanation! I didn't know the difference between "arguments" and "parameters" :)


BTW, is this written somewhere? It would be cool to add it to the manual...

Go ahead and add it :)

- Bert -


On Mon, Mar 28, 2011 at 10:02 AM, Bert Freudenberg <[hidden email]> wrote:
On 28.03.2011, at 14:17, Christine Murakami wrote:

Do you have some documentation on how parameters work in Etoys and what they can accomplish? I looked it up in your Floss manual but it was unclear to me where to find that information.

Many tiles in Etoys have a parameter. It is a value that influences the behavior of that tile.

For example, the "forward by" tile has a parameter that specifies how far the object should move. The "make sound" parameter specifies which sound to make. Etc.

You can also make your own tiles. When you create a new script, a tile for it is placed in an object's "scripts" viewer category. That tile can be used in another script.

The "add parameter" menu entry lets you add a parameter to your own tile. If you use that new tile in another script, you can set a specific value for the parameter just like with any other tile. 

Inside the script for your tile, that parameter is shown in the title bar. It is called "number" (unless you change the parameter type). You drag this "number" tile and use it like any variable tile in that script.

E.g. in this script, I used the "number" tile four times:

<PastedGraphic-1.png>

Every time you use your new tile, you can give it another "concrete" value. That's why in the script itself, you only have the "abstract" value called "number". (Computer scientists call the concrete values "arguments" and the abstract values "parameters", but even programmers get confused about the distinction)

<PastedGraphic-3.png>

Note that after adding a parameter, you can not set your script to "ticking" anymore, because it now needs a parameter. It only gets a concrete value for the parameter from another script where your tile is used. Additionally, you can set a value in the viewer, and hit the yellow button to run your script with that value:

<PastedGraphic-6.png>

- Bert -


_______________________________________________
squeakland mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/squeakland





_______________________________________________
squeakland mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/squeakland




_______________________________________________
squeakland mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/squeakland
Reply | Threaded
Open this post in threaded view
|

Re: What is a parameter in etoys?

Bert Freudenberg
Great, thank you!

Btw, everyone can contribute to the manual just like Richo did! Just go here and create an account:


For example, the "add parameter" section now would benefit from some editing to better fit in a manual, and it's missing the images.

As a reward your name will be listed in the book's authors section :)

- Bert -

On 30.03.2011, at 01:51, Ricardo Moran wrote:

Hi,

I modified the "User interface" chapter of the FLOSS manual to add Bert's explanation about parameters. I replaced the first paragraph of the old text with Bert's version. I just wanted to check with you to see if you approve this change. FYI, the old version was:

-----------------------
add parameter

This option adds a parameter to the script. The parameter is passed into the script when it is called from another script. For example if you can create a script that will move an object forward based upon the number, you can add a parameter of type number. Then call that script from one or more other scripts passing in a specific value as the number. To use the parameter in the script simply drag the parameter from the Script Editor's in the top line to the right of the scripts name into your script where any number data type can be used.

The following are the data types that can be used as parameters:

  • Boolean (true or false)
  • BorderStyle 
  • ButtonPhase
  • Color
  • Graphic
  • ImageResolution
  • Number
  • Patch
  • Point
  • ScriptName
  • Sound
  • String
  • TrailStyle 
-----------------------

On Tue, Mar 29, 2011 at 4:12 PM, Ricardo Moran <[hidden email]> wrote:
Ok, I'll do it tonight :)


On Mon, Mar 28, 2011 at 1:51 PM, Bert Freudenberg <[hidden email]> wrote:

On 28.03.2011, at 15:58, Ricardo Moran wrote:

Great explanation! I didn't know the difference between "arguments" and "parameters" :)


BTW, is this written somewhere? It would be cool to add it to the manual...

Go ahead and add it :)

- Bert -


On Mon, Mar 28, 2011 at 10:02 AM, Bert Freudenberg <[hidden email]> wrote:
On 28.03.2011, at 14:17, Christine Murakami wrote:

Do you have some documentation on how parameters work in Etoys and what they can accomplish? I looked it up in your Floss manual but it was unclear to me where to find that information.

Many tiles in Etoys have a parameter. It is a value that influences the behavior of that tile.

For example, the "forward by" tile has a parameter that specifies how far the object should move. The "make sound" parameter specifies which sound to make. Etc.

You can also make your own tiles. When you create a new script, a tile for it is placed in an object's "scripts" viewer category. That tile can be used in another script.

The "add parameter" menu entry lets you add a parameter to your own tile. If you use that new tile in another script, you can set a specific value for the parameter just like with any other tile. 

Inside the script for your tile, that parameter is shown in the title bar. It is called "number" (unless you change the parameter type). You drag this "number" tile and use it like any variable tile in that script.

E.g. in this script, I used the "number" tile four times:

<PastedGraphic-1.png>

Every time you use your new tile, you can give it another "concrete" value. That's why in the script itself, you only have the "abstract" value called "number". (Computer scientists call the concrete values "arguments" and the abstract values "parameters", but even programmers get confused about the distinction)

<PastedGraphic-3.png>

Note that after adding a parameter, you can not set your script to "ticking" anymore, because it now needs a parameter. It only gets a concrete value for the parameter from another script where your tile is used. Additionally, you can set a value in the viewer, and hit the yellow button to run your script with that value:

<PastedGraphic-6.png>

- Bert -


_______________________________________________
squeakland mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/squeakland





_______________________________________________
squeakland mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/squeakland




- Bert -



_______________________________________________
squeakland mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/squeakland