A client asked me to add an announcement to their website, informing visitors that their business would be shut during the holidays.
“Uh, ok”, I said, thinking that I could place an announcement in the sidebar, but the client wanted more. They wanted it visible, like really, really visible.
The solution we ended up with was to have the announcement displayed in an interface-blocking overlay when the site loaded. This would be shown to the user only once.
Although not overly user-friendly, some people might find this useful, so here’s how I coded it.
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.