In this example, the user can click on a push button to display a message
box. The message box is created by a Smalltalk script accessed through
an event-to-script connection.
Define the user interface shown above, then add a script to the part class:
displayMessage | messageBox | messageBox := (CwMessagePrompter new) title: 'Hey!'; messageString: 'Please do not press that button again.'. messageBox prompt.
The connection appears as a single-headed arrow pointing to an icon representing the script. When the user clicks on the push button, the script connection accesses the displayMessage method, running the script that displays the message box.