Subscribe to RSS Feed
Twitter
HIRE ME! home  archives  about  blogroll

FXMainWindow close event

03 Dec 2003

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, nil)
   else
      #We’ve decided not to shut down after all
   end
end
blog comments powered by Disqus