From 9beb9327dff9e47feb0f608eee81c2c5db0d7f41 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Mon, 27 Jun 1994 23:15:31 +0000 Subject: wait_{variable,window,visibility} register = _register --- Lib/lib-tk/Tkinter.py | 11 +++++++++++ Lib/tkinter/Tkinter.py | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py index 2c3390b..f3f17e1 100644 --- a/Lib/lib-tk/Tkinter.py +++ b/Lib/lib-tk/Tkinter.py @@ -79,6 +79,16 @@ class Misc: apply(self.tk.call, ('tk_menuBar', self._w) + args) def waitvar(self, name='PY_VAR'): self.tk.call('tkwait', 'variable', name) + wait_variable = waitvar + def wait_window(self, window=None): + if window == None: + window = self + self.tk.call('tkwait', 'window', window._w) + def wait_visibility(self, window=None): + if window == None: + window = self + self.tk.call('tkwait', 'visibility', window._w) + def setvar(self, name='PY_VAR', value='1'): self.tk.setvar(name, value) def getvar(self, name='PY_VAR'): @@ -331,6 +341,7 @@ class Misc: name = name + func.func_name self.tk.createcommand(name, f) return name + register = _register def _root(self): w = self while w.master: w = w.master diff --git a/Lib/tkinter/Tkinter.py b/Lib/tkinter/Tkinter.py index 2c3390b..f3f17e1 100755 --- a/Lib/tkinter/Tkinter.py +++ b/Lib/tkinter/Tkinter.py @@ -79,6 +79,16 @@ class Misc: apply(self.tk.call, ('tk_menuBar', self._w) + args) def waitvar(self, name='PY_VAR'): self.tk.call('tkwait', 'variable', name) + wait_variable = waitvar + def wait_window(self, window=None): + if window == None: + window = self + self.tk.call('tkwait', 'window', window._w) + def wait_visibility(self, window=None): + if window == None: + window = self + self.tk.call('tkwait', 'visibility', window._w) + def setvar(self, name='PY_VAR', value='1'): self.tk.setvar(name, value) def getvar(self, name='PY_VAR'): @@ -331,6 +341,7 @@ class Misc: name = name + func.func_name self.tk.createcommand(name, f) return name + register = _register def _root(self): w = self while w.master: w = w.master -- cgit v0.12