Page 362 -
P. 362
graphical interface elements
Test Drive
You’ve added in the line of code that terminates (destroys) your GUI
application. Now, press F5 to see what happens.
Poof!
When you click on the
close box now, the GUI
application disappears.
Which helps explain why you
can't see it on this page
anymore!
This extra line of
code makes all the
difference.
That‛s great!
Let‛s see my
rivals scoff now...
Your GUI is not only doing what the DJ wants; it’s behaving itself, too. By
redefining the protocol event associated with the click on the close box, you
are able to stop the track... eh... in its tracks. You also ensure that the default
behavior associated with the click is performed by arranging to destroy the
GUI application.
That’s great!
you are here 4 327