Title: Signature.html
WW,
    good. Thanks.
destroy() took care of it, but I wonder what advantage there was to Quit()?
WW

W W wrote:
On Tue, Mar 3, 2009 at 1:54 PM, Wayne Watson
<sierra_mtnv...@sbcglobal.net> wrote:
  
<snip>
BTW, the Quit function is original but doesn't kill the window when Quit is
used. What fixes that? For more bonus points, it seems as though the try
statement in the dialog should really bring up an "Error" dialog saying
something is wrong, when an invalid entry occurs. No need to construct an
error dialog for me, but I'd be curious how it might be handled.
<snip>
    


For the error dialog you can easily use tkMessageBox:

just import tkMessageBox and then use this:

In [2]: tkMessageBox.showerror('Some Error', 'An Error occurred!')
Out[2]: 'ok'

If you're expecting a specific error you can use

try:
    #some statements
except SpecificError:
    #Handle the error

In this case (at least the block I looked at) it's just printing to
the command line. You can handle it using any one of the message boxes
or creating your own.

  
    def Quit(self):
        self.running = False
        self.master.quit()
<snip>
    

You could also try self.master.destroy()

when I tried:

from Tkinter import *
root = Tk()
root.quit()

in an ipython session. It didn't close my root window but the destroy
method did.

HTH,
Wayne

  

--
           Wayne Watson (Watson Adventures, Prop., Nevada City, CA)

             (121.01 Deg. W, 39.26 Deg. N) GMT-8 hr std. time)
            

                In mathematics you don't understand things. 
                 You just get used to them.” -- John Von Neumann
                    (P.S. The same is true in life.)

                    Web Page: <www.speckledwithstars.net/>
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to