Skip to content
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

Merged
merged 7 commits into from Jan 5, 2023
Merged

wxpython4.0.7 #83

merged 7 commits into from Jan 5, 2023

Conversation

benkinooby
Copy link
Collaborator

@benkinooby benkinooby commented Sep 4, 2022

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]

class wxSourceId:

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
@benkinooby
Copy link
Collaborator Author

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?

[1] BjornFJohansson@d9b9a3b

@BjornFJohansson
Copy link
Collaborator

Hi all, I did this a long time ago, so it is not exactly fresh in my mind.
I added a bunch of plugins that most people might not be interested in.
We could make a new branch without these to facilitate seeing what changes are necessary.

@benkinooby
Copy link
Collaborator Author

Hi @BjornFJohansson
thanks for getting involved.

I did this a long time ago

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 could make a new branch without these to facilitate seeing what changes are necessary.

We, as in: you're willing to distill your wx-related code changes from your commits and create a PR to this repo?
That would be great, I think!

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?

[1] BjornFJohansson@d9b9a3b

@BjornFJohansson BjornFJohansson merged commit 7a14ff6 into WikidPad:python3.8plus Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants