On Sep 17, 2009, at 12:53 PM, John wrote: > I have a new issue with a dialog causing a seg fault. I've run > into this in > the past and would like to know the correct way to clo > > I have a button that calls _reschedCancel. The dialog "X" calls > onClose(). > My code does the following: > > def _reschedCancel(self,evt): > self.RetVal = 'Cancel' > self.onClose()
In general, "onSomething" should be a handler, and should not be called in code. > def onClose(self, evt=None): > self.RetVal = 'Cancel' > self.release() It looks like your code will set RetVal twice when you click the button. Not that that will cause a problem, but it's a sign that the code logic is probably wrong. Clicking the 'X' closes the form. You don't need to (and most likely shouldn't) release the form while it's in the process of being closed. From your button, just call self.Form.close(). The onClose will fire, and you can handle things there. Don't call release(); the closing process has already started, and unless you block it in beforeClose, it will close the form for you. -- Ed Leafe _______________________________________________ Post Messages to: Dabo-users@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/aa255eba-c7db-48e4-ba46-b67dd3502...@leafe.com