GUI component interaction: Difference between revisions

Content added Content deleted
(Added EchoLisp)
m (added whitespace before the TOC, added a Task (bold) header, presented three bullet items in the task requirements instead of a long sentence, split other requirements into separate sentences.)
Line 26: Line 26:
* pop up dialogs to query the user for further information
* pop up dialogs to query the user for further information



The task: For a minimal "application", write a program that presents
;Task:
a form with three components to the user:
For a minimal "application", write a program that presents a form with three components to the user:
A numeric input field ("Value") and two buttons ("increment" and "random").
::* a numeric input field ("Value")
::* a button ("increment")
::* a button ("random")



The field is initialized to zero.
The field is initialized to zero.

The user may manually enter a new value into the field,
The user may manually enter a new value into the field,
or increment its value with the "increment" button.
or increment its value with the "increment" button.

Entering a non-numeric value should be either impossible,
Entering a non-numeric value should be either impossible,
or issue an error message.
or issue an error message.
Line 39: Line 45:
and resets the field's value to a random value if the answer is "Yes".
and resets the field's value to a random value if the answer is "Yes".


(This task may be regarded as an extension of the task [[Simple windowed application]]).
(This task may be regarded as an extension of the task [[Simple windowed application]]).<br><br>


=={{header|Ada}}==
=={{header|Ada}}==