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

Fix _tkinter.TclError when on MacOS #283

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

RemoteCTO
Copy link

The .trace method is (being) deprecated in favour of .trace_add, and references to "ButtonPress-2" are now "ButtonPress-3"

See the following for more info: https://github.com/orgs/Homebrew/discussions/5809

@w8sl
Copy link

w8sl commented Jan 8, 2025

Thank you for PR!

Usage of TCL9 is inconsistent at the moment. Python.org and
GitHub runners are still on TCL8. Therefore, it may be better to fix buttons as recommended in discussion:

if "dar" in sys.platform and tk.TkVersion < 9:
            self.canvas.bind("<ButtonPress-2>", self.scroll_start)
            self.canvas.bind("<B2-Motion>", self.scroll_move)
            self.canvas.bind("<Control-ButtonPress-2>", self.delPol)

@RemoteCTO
Copy link
Author

@w8sl - Ah yes good point, I'll flip it over to that instead.

NB: There is one weird quirk I'm noticing in my local version of this, which is that it doesn't seem to persist the last selected square when closing and re-opening the app. Though I can't confirm yet if it's related.

@w8sl
Copy link

w8sl commented Jan 8, 2025

Cannot reproduce. Tested patched version of O4XP on Sequoia with all latest requirements (no versions) with Python 3.11, 3.12, 3.13

@w8sl
Copy link

w8sl commented Jan 8, 2025

brew reinstall python-tk (to get fixed version)

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.

2 participants