Suppose you have an application that has the following view:
Further suppose that you want the month, day, and year values given in the spin buttons on the top of the window to show in the Date text fields on the bottom of the window when the Display Date push button is pressed. But, unfortunately, your connections aren't giving the results that you want.
One way to test what values the spin buttons and text fields have is to print specific values to the System Transcript.
To print the values for the Month spin button and the DateMonth (left) text field:
testMonth "Print month values for Month drop-down list (m1) and DateMonth (m2) text field." | m1 m2 | m1 := (self subpartNamed: 'Month') object. m2 := (self subpartNamed: 'DateMonth') object. Transcript cr; show: m1 printString. Transcript cr; show: m2 printString.
The event-to-script connection will appear as a bright green arrow (see the graphic above).
Now, when you run the application and click on Display Date, the values for the Month spin button and the DateMonth text field print to the System Transcript. A nil value indicates that the settings for the part are wrong, or that the connections aren't enabling the part to get the correct value.
Change the settings or connections and rerun your application until you get the results you want.