diff options
-rw-r--r-- | Lib/lib-tk/Dialog.py | 11 | ||||
-rw-r--r-- | Lib/lib-tk/Tkinter.py | 2 | ||||
-rwxr-xr-x | Lib/tkinter/Dialog.py | 11 | ||||
-rwxr-xr-x | Lib/tkinter/Tkinter.py | 2 |
4 files changed, 16 insertions, 10 deletions
diff --git a/Lib/lib-tk/Dialog.py b/Lib/lib-tk/Dialog.py index 28222ec..022bd96 100644 --- a/Lib/lib-tk/Dialog.py +++ b/Lib/lib-tk/Dialog.py @@ -4,11 +4,12 @@ from Tkinter import * class Dialog(Widget): def __init__(self, master=None, cnf={}): Widget._setup(self, master, cnf) - self.num = apply(self.tk.call, - ('tk_dialog', self._w, - cnf['title'], cnf['text'], - cnf['bitmap'], cnf['default']) - + cnf['strings']) + self.num = self.tk.getint( + apply(self.tk.call, + ('tk_dialog', self._w, + cnf['title'], cnf['text'], + cnf['bitmap'], cnf['default']) + + cnf['strings'])) try: Widget.destroy(self) except TclError: pass def destroy(self): pass diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py index 5a2e6b2..4b012f1 100644 --- a/Lib/lib-tk/Tkinter.py +++ b/Lib/lib-tk/Tkinter.py @@ -679,6 +679,8 @@ class Widget(Misc, Pack, Place): return self._w def destroy(self): for c in self.children.values(): c.destroy() + if self.master.children.has_key(self._name): + del self.master.children[self._name] self.tk.call('destroy', self._w) def _do(self, name, args=()): return apply(self.tk.call, (self._w, name) + args) diff --git a/Lib/tkinter/Dialog.py b/Lib/tkinter/Dialog.py index 28222ec..022bd96 100755 --- a/Lib/tkinter/Dialog.py +++ b/Lib/tkinter/Dialog.py @@ -4,11 +4,12 @@ from Tkinter import * class Dialog(Widget): def __init__(self, master=None, cnf={}): Widget._setup(self, master, cnf) - self.num = apply(self.tk.call, - ('tk_dialog', self._w, - cnf['title'], cnf['text'], - cnf['bitmap'], cnf['default']) - + cnf['strings']) + self.num = self.tk.getint( + apply(self.tk.call, + ('tk_dialog', self._w, + cnf['title'], cnf['text'], + cnf['bitmap'], cnf['default']) + + cnf['strings'])) try: Widget.destroy(self) except TclError: pass def destroy(self): pass diff --git a/Lib/tkinter/Tkinter.py b/Lib/tkinter/Tkinter.py index 5a2e6b2..4b012f1 100755 --- a/Lib/tkinter/Tkinter.py +++ b/Lib/tkinter/Tkinter.py @@ -679,6 +679,8 @@ class Widget(Misc, Pack, Place): return self._w def destroy(self): for c in self.children.values(): c.destroy() + if self.master.children.has_key(self._name): + del self.master.children[self._name] self.tk.call('destroy', self._w) def _do(self, name, args=()): return apply(self.tk.call, (self._w, name) + args) |