thecocce / pyscripter

Automatically exported from code.google.com/p/pyscripter
0 stars 0 forks source link

Tkinter frame.quit runtime error #341

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Load PyScripter 1.9.9.7
2. Load attached code or see bottom of this message.
3. Run the program and click the 'quit' button.
4. It will then lock up and after 10-15 sec. will return a runtime error.

What is the expected output? What do you see instead?
The application should quit/close.

What version of the product are you using? On what operating system?
PyScripter 1.9.9.7
Windows XP SP3
Python 3.0

Please provide any additional information below.
If you run the script without using PyScripter it works without locking up
or outputting any errors.

>>>>>>>>>>>>>> CODE START <<<<<<<<<<<<<<
from tkinter import *

class App:
    def __init__(self, master):
        frame = Frame(master)
        frame.pack()
        self.button = Button(frame, text="QUIT", fg="red", command=frame.quit)
        self.button.pack()

root = Tk()
app = App(root)
root.mainloop()
>>>>>>>>>>>>>> CODE END <<<<<<<<<<<<<<

Original issue reported on code.google.com by nox.fr...@gmail.com on 19 Nov 2009 at 5:29

Attachments:

GoogleCodeExporter commented 9 years ago
Tested with PyScripter v2.0 and Python 2.6
With the remote engine the example works (exits gracefully) but the Tk window 
is not destroyed.  It does if you replace frame.quit with root.destroy.
With the Remote(Tk) engine the example works fine.

Note that you need to use one of the remote engines when running GUI scripts 
and reinitialize before each run.  This is done by default in PyScripter v2.0.

Original comment by pyscripter on 20 Aug 2010 at 10:27