[Pythonmac-SIG] "A GUI Test Session" from Learning Python Crashes

Joseph J. Strout joe@strout.net
Fri, 1 Oct 1999 14:58:20 -0700


At 4:00 PM -0500 10/01/99, Brian J. Stankiewicz wrote:

>Okay, I have done some more testing ont he problem and here are some more
>symptoms that I am finding.  If I run one of the Demos
>(Demo:tkinter:Matt:Canvas-demo-sipmple.py) from the IDE I get the tk window
>displayed, but when I hit the "quit" button the Python completely freezes.
>However, if I run the same program by simply double-clicking on the .py
>file and running it in the Python interpretor only, it runs just fine and
>will quit gracefully.

This is not too surprising.  The IDE has its own menu bar.  Tk has 
its own menu bar.  When you run a Tk program from within the IDE, 
Tk's menu bar clobbers that of the IDE.  When the Tk program quits, 
there is no longer a valid menu bar, and the Mac goes off in search 
of one and never comes back.  ;)  (Actually, it probably just shoots 
itself.)

Sadly, the IDE is not good for making stand-alone apps which have 
their own menu bar, or for doing just about anything with Tk.

Cheers,
-- Joe

,------------------------------------------------------------------.
|    Joseph J. Strout           Biocomputing -- The Salk Institute |
|    joe@strout.net             http://www.strout.net              |
`------------------------------------------------------------------'