-
Notifications
You must be signed in to change notification settings - Fork 367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wxSplitterWindow idle event handler for Python #729
Comments
I don't know any Python at all or how the wxWidgets language binding does work, so i can only guess here. This event handler should be called only once during idle time, apparently it gets called too late, after the C++ side got cleaned up. Or maybe too early, when the C++ side isn't initialized yet? Do you initialize wxWidgets properly? To you create or delete your Python objects at the wrong time? In C++ e.g. you cannot use most wxWidgets components as static class members because the will get used before wxWidgets is initialized, maybe some problem like this exists in Python as well. |
After looking at the code some more, it looks like it ought to unbind itself after the first call, and yet it seems to get called 5 times in a row. Seems like the unbind is never actually executed. |
Eventually, I recalled from, my work long ago, when I was using wxFB for my C++ projects, that it adds its own OnIdle handler, which it immediately removed. Hence for C++ I had to add my own OnIdle handler if I wanted this feature to work with my own needs. As |
There is a similar issue (IMO) discussed @: https://stackoverflow.com/questions/25712775/wxpython-unbind-method-returns-true-but-doesnt-unbind |
I have now raised the issue on the wxPython forum, because it looks to me as though the problem is with wxPython not unbinding the handler |
The current event handler code for the splitter causes a crash when exiting a python app using the code from wxFB which includes a splitter.
As I am very new to (wx)Python, I have no idea if or how this can be fixed. Any help or comments will be much appreciated.
The generated code:
with the error
The text was updated successfully, but these errors were encountered: