Barf

Ivan Van Laningham ivanlan at callware.com
Tue Nov 2 14:14:02 EST 1999


Hi All--
I just noticed something rather interesting.  I ran this script:

----------cut here-----------------
#!/usr/local/bin/python

from Tkinter import *
import tkMessageBox
import sys

def die():
    sys.exit(0)

def callee():
    print "I was called; few are chosen"

def about():
    tkMessageBox.showinfo("tkmenu","This is tkmenu.py Version 0")
    
root = Tk()
bar = Menu(root)

filem = Menu(bar)
filem.add_command(label="Open...", command=callee)
filem.add_command(label="New...", command=callee)
filem.add_command(label="Save", command=callee)
filem.add_command(label="Save as...", command=callee)
filem.add_separator()
filem.add_command(label="Exit", command=die)

helpm = Menu(bar)
helpm.add_command(label="Index...", command=callee)
helpm.add_separator()
helpm.add_command(label="About", command=about)

bar.add_cascade(label="File", menu=filem)
bar.add_cascade(label="Help", menu=helpm)

root.config(menu=bar)
root.mainloop()
----------cut here-----------------

It works fine, but if I move the mouse pointer out of the info box
(select Help->About) and back to the main window, I get a segmentation
violation.

This is running on Windows NT 4.0, SP 5; Dell 400MHZ PII Cpu, 128MB
ram.  It does *not* happen on Windows 98, running the identical version
of Python 1.5.2 (latest download, but not CVS).

Also, it makes no difference whether I run it 'python tkmenu.py' or just
'tkmenu.py' (using MKS toolkit).

Is this a known bug?

<there-ain't-no-bugs-on-me>-ly y'rs,
Ivan
----------------------------------------------
Ivan Van Laningham
Callware Technologies, Inc.
ivanlan at callware.com
ivanlan at home.com
http://www.pauahtun.org
See also: 
http://www.foretec.com/python/workshops/1998-11/proceedings.html
Army Signal Corps:  Cu Chi, Class of '70
----------------------------------------------




More information about the Python-list mailing list