[CentralOH] Tkinter on Mac
microenh at hughes.net
Sat Aug 14 13:31:56 CEST 2010
Is anyone using Tkinter on a Mac with Tk 8.5?
It looks like the protocol handler for WM_DELETE_WINDOW is broken. I'm trying to use that protocol to catch when the user clicks on the close icon in the window bar (red dot) to close a window that has data that needs to be saved. The app displays a dialog giving the user the options YES, NO and CANCEL. If the user clicks CANCEL, the idea is that the window close is cancelled. This is supposedly handled by the protocol handler returning without calling .destroy(). This works on Windows XP with Tk 8.5, but on the Mac, the window is hidden from the screen. It doesn't look like it has been iconized (doesn't show up in the dock), but the app still acts like it's there, but it's not visible on the screen.
I installed a newer version (2.6.5) of Mac Python, which ironically, installs Tk 8.4.x. WIth Tk 8.4, the WM_DELETE_WINDOW protocol handler seems to work properly.
More information about the CentralOH