Fix _tkinter.TclError when on MacOS
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
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)
@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.
Cannot reproduce. Tested patched version of O4XP on Sequoia with all latest requirements (no versions) with Python 3.11, 3.12, 3.13
brew reinstall python-tk (to get fixed version)