Etoys: parameters, variables, and using non-number data types

Ned Konz ned at bike-nomad.com
Sat Aug 30 14:29:37 UTC 2003


John Voiklis wrote:

> It is that all there is to data types...I guess that I am more up to speed
> than I thought.
> 
> 
>>Menu  I don't know, never used it.
> 
> 
> Actually, the menu data type is the one that inspired all my questions.

It is used for the doMenuItem: method. It refers to an item off the costume's 
halo menu.

If you look at the DataType and TileMorph hierarchies, all will become clear.

You can also look for senders of (for instance) #Menu, which will lead you to 
where it's used in Morph>>additionsToViewerCategoryMiscellaneous.

ScriptName is the same kind of thing, but for scripts that a Player owns.

>>John Voiklis wrote:
>>
>>>Hello,
>>>
>>>I have been working on creating documentation (ref. manual and tutorials) on the etoy environment. I have made progress, but, every so often, my knowledge of the system proves inadequate. In those cases, I turn to the community for help. To that end, I sent the message below to the Squeakland list; something tells me, though, that I should have sent it here. Can anyone help:
>>>
>>>...
>>>
>>>I have been tinkering with writing some advanced topic tutorials and I have run aground when it comes to using non-number data types with variables and with using parameters (whatever the data type).
>>>
>>>Can someone give me the run down on the use and usefulness of the various variable data types, as well as the use and usefulness of etoy parameters?
>>>
>>>I am not looking for anything in-depth; after all, tutorial writing is my problem. A quick explanation and an even quicker example is more than I need.
>>>
>>
>>Hmm, how much do you need to know ? ;-)
>>Well, you have:
>>Boolean
>>Color
>>Graphic
>>Menu
>>Number
>>Player
>>ScriptName
>>Sound
>>String
>>
>>Most are for setting, getting and testing.
>>Boolean is either true or false.  Use for setting,getting or testing.
>>Color is a color as color, not as a rgb value. Use for setting,getting
>>or testing color.
>>Graphic is the Players graphic eg. drawing. Use it for animation.
>>Menu  I don't know, never used it.
>>Number is for numbers. Use for setting,getting or testing.
>>Player is the morph on screen and it's player.
>>ScriptName I don't know, never used it.
>>Sound is for sounds.
>>Strings for text.





More information about the Squeak-dev mailing list