summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1994-06-27 23:15:31 (GMT)
committerGuido van Rossum <guido@python.org>1994-06-27 23:15:31 (GMT)
commit9beb9327dff9e47feb0f608eee81c2c5db0d7f41 (patch)
treee4bf3b348fb13c5c236817fdd85e08eddea4abcb
parentc93e13d734b286f1571175bc553abe88be764ff0 (diff)
downloadcpython-9beb9327dff9e47feb0f608eee81c2c5db0d7f41.zip
cpython-9beb9327dff9e47feb0f608eee81c2c5db0d7f41.tar.gz
cpython-9beb9327dff9e47feb0f608eee81c2c5db0d7f41.tar.bz2
wait_{variable,window,visibility}
register = _register
-rw-r--r--Lib/lib-tk/Tkinter.py11
-rwxr-xr-xLib/tkinter/Tkinter.py11
2 files changed, 22 insertions, 0 deletions
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