while i was looking for some other answers, i found another interesting post on the comp.lang.ruby newsgroup.

how to capture the close-event from the main window assuming your using FXRuby :p (snippet from post):

theMainWindow.connect(SEL_CLOSE) do

Do fun things

verify_things

clean_up_things



if ok_to_quit?

All is well to shut down, so go ahead

and send the ID_QUIT message to the

application.

theMainWindow.app.handle(theMainWindow,

MKUINT (FXApp::ID_QUIT, SEL_COMMAND), nil)

else

#We’ve decided not to shut down after all

end

end


Date
December 3, 2003