mirror of
https://github.com/python/cpython.git
synced 2025-08-29 21:25:01 +00:00
Dialog.py: d.num should be numeric, not string
Tkinter.py: on destroy(), remove self from master's dict of children
This commit is contained in:
parent
c1be9d59e4
commit
f023ab0471
4 changed files with 16 additions and 10 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue