Marc Culler <marc.cul...@gmail.com> added the comment:
I was able to fix this problem for Tk on Monterey beta [21A5543b]. The fix has been committed to the tip of the core-8-6-branch in the Tk fossil repository. Here is a synopsis. Tk used to open the file dialog by calling [NSApp runModalForWindow:panel]. Starting with the release of 10.14 this call would produce a warning message on stderr saying that [NSOpenPanel runModal] should be used instead. But on systems older than 10.14, the runModal method would fail because the completion handler would not get called. Now, with 12.0 (at least in the beta) calling [NSOpenPanel runModal] produces an error dialog saying "The open file operation failed to connect to the open and save panel service" and this would be accompanied by a traceback printed on stderr for an assertion error. (It was not a "crash" but the file selection would fail.) However, it turns out that calling [NSApp runModalForWindow:panel] no longer produces the warning in 12.0, and it works correctly. So my workaround was to add conditional code that only calls the runModal method on 10.14 and 10.15 and calls runModalForWindow on other versions of macOS. I tested on 10.15 and it works there as well. Needless to say, none of these changes are documented by Apple. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue44828> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com