alice-teacher Question about passing values of variables through private methods

André Gustavo Schaeffer andre_schaeffer at yahoo.com.br
Thu Mar 14 10:58:32 EDT 2013


Hi everyone.

Does anybody knows how can I pass a value of some variable to a private method of another object?
For example, I have a variable read inside a method of an object, and then I want to make some calculation using that value but only when I click over another object. 

Another question... what is the objective of using a parameter instead of using a variable?
I thought a parameter in Alice was like a global variable, but it don't seems to be.

And finally... can I have a global variable (accessible for all private methods)?

Sorry if it was already raised here in this forum.
And, of course, I’ve searched in the tutorials that I have but haven’t found.


PS.: I’m sending attached a world for studing the distance between 2 point in the coordinate plan for sharing purposes. I’ve made yesterday.
Any suggestion will be welcome.

Prof. André Gustavo Schaeffer
Universidade Federal da Fronteira Sul
Erechim(RS) – Brasil
andre_schaeffer at yahoo.com.br
https://sites.google.com/site/andregustavoschaeffer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.andrew.cmu.edu/pipermail/alice-teachers/attachments/20130314/97254c4c/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Distance2Points.rar
Type: application/octet-stream
Size: 4178015 bytes
Desc: not available
Url : http://lists.andrew.cmu.edu/pipermail/alice-teachers/attachments/20130314/97254c4c/attachment-0001.obj 


More information about the alice-teachers mailing list