This example shows how simple user events can trigger the execution of some Oz code.

Many widgets (see the documentation) have an action parameter that defines a command to execute just after the user has modified the state of the widget.

In the example below, the command defined by the action parameter of the button widget is executed just after the user has clicked on it.

A command can take different forms :
- A zero parameter procedure.
- A pair Object#method : the method of the object is invoked.
- A pair Port#message : the message is sent to the port.
- A pair toplevel#method : the method of the toplevel object (the object returned by the QTk.build function) is invoked.
- A pair widget#method : the method of the object controlling this widget is invoked.

A unique thread is associated to each QTk window. All commands defined for a window are executed sequentially in this thread,  in the order they were triggered. If there are commands pending after a window has been closed, these commands are just ignored. If you want different commands to execute concurrently, you have to explicitly create threads.
