Archive image

Posts Tagged ‘gui programming’

FXRuby – How to capture close on the main window

I wrote a small FXRuby program which allows the user to do some simple file manipulation, then upload the altered files via FTP to a web server.

I ran into a small problem in that when the user clicked the “Close” button (the X in the upper right-hand corner) of the main window, the application closed straight away.

Normally, this would be the desired behaviour, but in this case I wanted to intercept this message and do some application cleanup first (delete temporary files, make sure the user had saved their work etc).

Here’s how I did it.

Read more…

An introduction to FXRuby

I recently got an article published on Rubysource.com entitled “An introduction to FXRuby”. In this article I show you how to get up and running with FXRuby, introduce you to some of the more commonly used widgets, and demonstrate how to build a simple application with some real world value (a password generator).

Read the complete article on Rubysource