PDA

View Full Version : How to capture (in a variable or property) user input?


Sophie
06-02-2009, 10:19 AM
I can use world.ask user to get numbers, booleans, and strings; but I cannot find a way to capture that user input into a method variable or an object property.

I also cannot find a way to do string or other functions (e.g. a joined with b) easily within an object method, since these functions are only defined on world, and are not available to the expressions within a method of some other object.

Help?

DrJim
06-02-2009, 11:04 AM
For the first, you should just be able to drag and drop the property into the edit screen with a dummy value and then substitute the "real" variable. It's a little awkward, but usually works.

For the second, unfortunately string functions are very limited in Alice 2.0. Based on a quick look, Alice 3.0 looks much better (as well as supporting different numberical formats) so if the capability is something you need, you might want to try that. Just remember 3.0 is still very much "beta" software.

Sophie
06-04-2009, 02:22 PM
Thank you, DrJim.