My app_base.BaseApp.OnExit is del'ing the instance of wx.SingleInstanceChecker, but it seems that for some reason OnExit is never called
In the dialog I also tried having a self.Bind(wx.EVT_CLOSE, self.OnClose) and in the binder I just do evt.Skip(), note that my dialog doesn't have a wx.ID_OK button, but even if I change one button to use that and clicking that button obviously closed the dialog now, but the "X" on the title bar still doesn't do anything.
Any tips on what one needs to do differently?
Just tried with a very basic dialog and it closes, so it is obviously me doing something which prevents it from closing and calling OnExit.
My app_base.BaseApp.OnExit is del'ing the instance of wx.SingleInstanceChecker, but it seems that for some reason OnExit is never called
In the dialog I also tried having a self.Bind(wx.EVT_CLOSE, self.OnClose) and in the binder I just do evt.Skip(), note that my dialog doesn't have a wx.ID_OK button, but even if I change one button to use that and clicking that button obviously closed the dialog now, but the "X" on the title bar still doesn't do anything.
Any tips on what one needs to do differently?
Just tried with a very basic dialog and it closes, so it is obviously me doing something which prevents it from closing and calling OnExit.
My app_base.BaseApp.OnExit is del'ing the instance of
wx.SingleInstanceChecker, but it seems that for some reason OnExit is
never called
In the dialog I also tried having a self.Bind(wx.EVT_CLOSE,
self.OnClose) and in the binder I just do evt.Skip(), note that my
dialog doesn't have a wx.ID_OK button, but even if I change one button
to use that and clicking that button obviously closed the dialog now,
but the "X" on the title bar still doesn't do anything.
Any tips on what one needs to do differently?
Just tried with a very basic dialog and it closes, so it is obviously
me doing something which prevents it from closing and calling OnExit.
OnExit is probably only called if I had a TopLevel Window but as this is
just for testing this particular dialog there isn't one.
Manually calling OnExit resolves the "Delete stale lock file" issue,
i.e. doing this:
Attached is the sample it show the "not closing" problem and the SetBackGroundColour one. I see that Vadim closed issue - <http://trac.wxwidgets.org/ticket/13487#comment:2> as it works for him on wx, can I reopen it and change the component to wxPython?
Note the the issue of the dialog not closing has to do with the use of the sized_controls.SizedDialog if you change lines 13 and 14 to use wx.Dialog instead then it closes.
Will try later today and see if I can isolate it further.
Please create a small sample app that shows the problem.
Attached is the sample it show the "not closing" problem and the SetBackGroundColour one. I see that Vadim closed issue - <http://trac.wxwidgets.org/ticket/13487#comment:2> as it works for him on wx, can I reopen it and change the component to wxPython?
Note the the issue of the dialog not closing has to do with the use of the sized_controls.SizedDialog if you change lines 13 and 14 to use wx.Dialog instead then it closes.
Will try later today and see if I can isolate it further.
No, but I'll explain that his test is testing the wrong thing. He should try setting the color of the dialog and then create the panel...
···
On 9/19/11 12:33 AM, werner wrote:
On 09/18/2011 10:05 PM, Robin Dunn wrote:
Please create a small sample app that shows the problem.
Attached is the sample it show the "not closing" problem and the
SetBackGroundColour one. I see that Vadim closed issue -
<http://trac.wxwidgets.org/ticket/13487#comment:2> as it works for him
on wx, can I reopen it and change the component to wxPython?
It does for me with this example. Windows7, wxPy 2.9.2.4.
···
On 9/19/11 3:20 AM, werner wrote:
On 09/19/2011 09:33 AM, werner wrote:
On 09/18/2011 10:05 PM, Robin Dunn wrote:
Please create a small sample app that shows the problem.
Attached is the sample it show the "not closing" problem and the
SetBackGroundColour one. I see that Vadim closed issue -
<http://trac.wxwidgets.org/ticket/13487#comment:2> as it works for him
on wx, can I reopen it and change the component to wxPython?
Note the the issue of the dialog not closing has to do with the use of
the sized_controls.SizedDialog if you change lines 13 and 14 to use
wx.Dialog instead then it closes.
Will try later today and see if I can isolate it further.
Ignore file attached to the previous post - had some errors with regards
to the inheritance setup I like to have (at least I think so).
Doing further testing it seems that the culprit is:
self.SetExtraStyle(wx.WS_EX_VALIDATE_RECURSIVELY)
If I add this then even using wx.Dialog as a base I see the problem that
"X" doesn't close anymore.
Ok, that sounds like a wxGTK bug then, and it also happens in 2.9. Go ahead and make a trac ticket for it, but you may want to simplify your example as it's sorta confusing as-is. Try it without using Boa.
···
On 9/19/11 10:05 AM, werner wrote:
On 09/19/2011 07:01 PM, Robin Dunn wrote:
...
Doing further testing it seems that the culprit is:
self.SetExtraStyle(wx.WS_EX_VALIDATE_RECURSIVELY)
If I add this then even using wx.Dialog as a base I see the problem that
"X" doesn't close anymore.
It does for me with this example. Windows7, wxPy 2.9.2.4
On Windows it works, I only have the close problem under Ubuntu (still
wxPy 2.8.12 - didn't get around to build 2.9 yet).
Doing further testing it seems that the culprit is:
self.SetExtraStyle(wx.WS_EX_VALIDATE_RECURSIVELY)
If I add this then even using wx.Dialog as a base I see the problem that
"X" doesn't close anymore.
It does for me with this example. Windows7, wxPy 2.9.2.4
On Windows it works, I only have the close problem under Ubuntu (still
wxPy 2.8.12 - didn't get around to build 2.9 yet).
Ok, that sounds like a wxGTK bug then, and it also happens in 2.9. Go ahead and make a trac ticket for it, but you may want to simplify your example as it's sorta confusing as-is. Try it without using Boa.
Doing further testing it seems that the culprit is:
self.SetExtraStyle(wx.WS_EX_VALIDATE_RECURSIVELY)
If I add this then even using wx.Dialog as a base I see the problem that
"X" doesn't close anymore.
It does for me with this example. Windows7, wxPy 2.9.2.4
On Windows it works, I only have the close problem under Ubuntu (still
wxPy 2.8.12 - didn't get around to build 2.9 yet).
Ok, that sounds like a wxGTK bug then, and it also happens in 2.9. Go ahead and make a trac ticket for it, but you may want to simplify your example as it's sorta confusing as-is. Try it without using Boa.