Saturday, July 18, 2009

Beginning Alice - 4


If we look at the details area of a world object from samples/tutorials in Alice, we might see that it could consist of an arbitrary number of (world-level) methods. So how does Alice know which method shall be executed if a user plays the scenario? Well, yes, event!

When a user clicks on the Play button in Alice, this triggers a "the world starts" event. If we look in the upper-right region of the Alice window above, you will see that when the world starts, the program will call a method associated with this event i.e. in this case, "world.my first method".

No comments:

Post a Comment