A
Andrew Trevorrow
Our app uses embedded Python to allow users to run arbitrary scripts.
Scripts that import Tkinter run fine on Windows, but on Mac OS X there
is a serious problem. After a script does "root = Tk()" our app's menus
are permanently changed in the following way:
- The top item in the application menu changes to "About Tcl & Tk...".
- The Quit item is disabled.
- The File and Edit menus are completely replaced.
- All further menus (except Help) are removed.
Is there a way to prevent Tkinter clobbering our app's menus?
Or perhaps a way to restore them after the root.mainloop() call?
I've read Fredrik Lundh's excellent tutorial on Tkinter and done a lot
of googling but haven't been able to find a solution.
I can probably add some Mac-specific code to detect a menu change after
a script ends and then rebuild our menus, but I'm hoping there's a
simpler Tkinter (or Tcl?) solution.
Andrew
Scripts that import Tkinter run fine on Windows, but on Mac OS X there
is a serious problem. After a script does "root = Tk()" our app's menus
are permanently changed in the following way:
- The top item in the application menu changes to "About Tcl & Tk...".
- The Quit item is disabled.
- The File and Edit menus are completely replaced.
- All further menus (except Help) are removed.
Is there a way to prevent Tkinter clobbering our app's menus?
Or perhaps a way to restore them after the root.mainloop() call?
I've read Fredrik Lundh's excellent tutorial on Tkinter and done a lot
of googling but haven't been able to find a solution.
I can probably add some Mac-specific code to detect a menu change after
a script ends and then rebuild our menus, but I'm hoping there's a
simpler Tkinter (or Tcl?) solution.
Andrew