parameters: (self, event)
docstring: Close browser application
docstring_summary: Close browser application
docstring_tokens: Close browser application
function: def on_exit(self, event):
          """Close browser application"""
          dlg = wx.MessageDialog(self,
                                 'Browser is about to close.\nDo you want to SAVE the current object before closing?',
                                 'Closing Browser',
                                 wx.YES_NO | wx.CANCEL | wx.ICON_QUESTION)
          ans = dlg.ShowModal()
          dlg.Destroy()
          # print '  ans,wx.ID_CANCEL,wx.ID_YES,wx.ID_NO',ans,wx.ID_CANCEL,wx.ID_YES,wx.ID_NO
          if ans == wx.ID_CANCEL:
              # print ' do not quit!'
              pass
  
          elif ans == wx.ID_YES:
              # print ' save and quit'
              self.on_save_as(event)
              self.destroy()
  
          elif ans == wx.ID_NO:
              # print 'quit immediately'
              self._mainframe.destroy()
function_tokens: def on_exit ( self , event ) : dlg = wx . MessageDialog ( self , 'Browser is about to close.\nDo you want to SAVE the current object before closing?' , 'Closing Browser' , wx . YES_NO | wx . CANCEL | wx . ICON_QUESTION ) ans = dlg . ShowModal ( ) dlg . Destroy ( ) # print '  ans,wx.ID_CANCEL,wx.ID_YES,wx.ID_NO',ans,wx.ID_CANCEL,wx.ID_YES,wx.ID_NO if ans == wx . ID_CANCEL : # print ' do not quit!' pass elif ans == wx . ID_YES : # print ' save and quit' self . on_save_as ( event ) self . destroy ( ) elif ans == wx . ID_NO : # print 'quit immediately' self . _mainframe . destroy ( )