callback

The absolute beginners guide - Part II - for gnu-smalltalk/gtk (window closing callbacks)

Tagged:  •    •    •    •    •    •  

Let's start with enhancing the small app from the last step.

The problem that we are facing right now is, if we close the app through the window-managers 'close' button, the application (or better the GTK-Main-Loop) is still running and to end it, we have to press Ctrl-D.

Because I start the script from the command-line, I also would like to see, if I close the app, that the command line will come up again.

The solution seems, to create a method, that would be called, if the user presses the close button. We have to clean up the window and to close the app.

Syndicate content

User login