error exiting mainloop in tkinter

Curly Joe woooee at yahoo.com
Wed Jun 18 21:43:17 CEST 2003


I only know simple things about Tkinter, so this may
or may not help.  Try it with a root window, i.e.
root = Tk()
app = Application(root) # Instantiate the application
class
app.master.title("Sample application")
app.mainloop() # Wait for events

I don't know what happens with the statement
app.master.title when master=None
Here's a better example to look at:
http://www.pythonware.com/library/tkinter/introduction/hello-again.htm
 
> --- In python-list at yahoogroups.com, Bobster
> <nospam at n...> wrote:
> > Hi! 
> > 
> > I have problem exiting python/tkinter application
> (Python 2.2.3 + WinXP)
> > When I run the self.quit procedure I get windows
> error: 
> > 	
> > The instruction at "0x77f7e22a" refernced memory
> at "0x00000028". The 
> > memory could not be "read".
> > 
> > Meanwhile all other actions/procedures using
> tkinter work perfectly.
> > 
> > Bobster
> > 
> > 
> > Below I enclos a piece of code (taken from a
> tkinter book) showing the 
> > problem.
> > 
> > from Tkinter import * # Interface to Tk widgets
> > 
> > class Application(Frame):
> > 	def __init__(self, master=None):
> > 		Frame.__init__(self, master)
> > 		self.grid()
> > 		self.createWidgets()
> > 	def createWidgets(self):
> > 		self.quitButton = Button ( self, text="Quit", 
> > command=self.quit )
> > 		self.quitButton.grid()
> > 
> > app = Application() # Instantiate the application
> class
> > app.master.title("Sample application")
> > app.mainloop() # Wait for events
> > -- 
> >
> http://mail.python.org/mailman/listinfo/python-list
> 


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com





More information about the Python-list mailing list