confused RE: dialog box when I edit method -
09-10-2008, 07:28 PM
Here is my code. When I first open Alice.exe and if I click on edit to edit the 'process data' method, it comes up with the dialog box "enter coaches name". Than it comes up a 2nd time and goes away. If I click on edit again, it won't come up. If I run the code, it seems to work fine.
alice140labproja's Code
Created by: Mary
world
Events
When the world starts
Do: world.main ( );
Methods
public void main ( ) {
// Call process data method
world.processData ( );
}
public void processData ( ) {
String coachesName = default string ; Number coachesAge = 1 ; String ageAsString = default string ; String finalString = default string ;
// Get coach's name from user and display coaches name
doInOrder {
coachesName .set( value , ( StringDialog( question = Enter coach's name ) ) );
coach .say( ( My name is + coachesName ) ); duration = 1 second
}
// Get coach's age from user and display age
doInOrder {
coachesAge .set( value , ( NumberDialog( question = Enter Coach's age ) ) );
ageAsString .set( value , ( coachesAge .toString() ) );
finalString .set( value , ( My age is + ageAsString ) );
coach .say( finalString );
}
}
|