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
wxpython4.0.7 #83
wxpython4.0.7 #83
Conversation
wx.Bind() accepts only integer for argument "id" or objects with a .GetId() method for argument "source" https://docs.wxpython.org/wx.EvtHandler.html#wx.EvtHandler.Bind until now, objects of type wxSourceId were used as "id" arguments. solution: either pass wxSourceId objects as "source" instead of "id", or pass wxSourceId.GetId() as "id"
…d and arguments of type wxSourceId are no longer accepted
…Id.GetId() conversion
For reference: There is a fork by @BjornFJohansson to make WikidPad work with wx4.1.0 [1] . That fork/commit contains 31 changed files with 17,179 additions and 2,413 deletions. Most changes seem to be white-space changes and I can't really identify the significant changes Bjorn applied to make WikidPad work. Additionally, the fork seems to hold additional functionality, specifically tailored to the needs of the fork owner. Maybe it would safe us all some time if we coordinated our efforts? |
…g dimensions of graphical objects
Hi all, I did this a long time ago, so it is not exactly fresh in my mind. |
Hi @BjornFJohansson
Oof, just checked and saw that you worked on wx 4.1 in 2020. I didn't realize I was that late to the party.
We, as in: you're willing to distill your wx-related code changes from your commits and create a PR to this repo? Alternatively, we could take things from this PR, which is much cleaner than your commit [1] (I mean no offence), and use your work as a cheat sheet when moving forward from wx 4.0.7 to wx 4.1.x in a second step. In fact, that's what should have happened with this PR, but didn't because I didn't think of discovering "prior art". Let me know what way you'd suggest to go. I'll be with you either way. @butscher (since you made the last commit to master) would you be in favour of merging such a PR? |
Make WikidPad run again after encountering #82
The core issue was a type mismatch caused by wxSourceId [1] objects, which were passed on wx.EvtHandler.Bind() and wx.event.Connect() function calls from wx instead of integers.
Additionally, I fixed some minor type mismatches between float and int which occured when dividing ints by two to calculated dimension (in pixels) of graphical elements.
With this PR, WikidPad will be able to start with python 3.10 with wxpython 4.0.7
I probably have missed some places where this mismatch occurs. No systematic refactoring was done. This PR implements the bare minimum band aid to make WikidPad functional again. Therefore, this PR is not targeted at the master branch but continues my "work" on branch python3.8plus
[1]
WikidPad/WikidPad/lib/pwiki/wxHelper.py
Line 31 in 5581096