Mon Jul 4 12:42:04 1994 Guido van Rossum (guido@voorn.cwi.nl)
* Tkinter.py (Misc.bind_all): fix typo (name shouldn't be quoted). Wed Jun 29 10:02:21 1994 Guido van Rossum (guido@voorn.cwi.nl) * Tkinter.py (Misc.selection_get): add 'return' (Tk.destroy): self.master is always None
This commit is contained in:
parent
526beed88d
commit
bd84b04f64
|
@ -147,7 +147,7 @@ class Misc:
|
||||||
def selection_clear(self):
|
def selection_clear(self):
|
||||||
self.tk.call('selection', 'clear', self._w)
|
self.tk.call('selection', 'clear', self._w)
|
||||||
def selection_get(self, type=None):
|
def selection_get(self, type=None):
|
||||||
self.tk.call('selection', 'get', type)
|
return self.tk.call('selection', 'get', type)
|
||||||
def selection_handle(self, func, type=None, format=None):
|
def selection_handle(self, func, type=None, format=None):
|
||||||
name = self._register(func)
|
name = self._register(func)
|
||||||
self.tk.call('selection', 'handle', self._w,
|
self.tk.call('selection', 'handle', self._w,
|
||||||
|
@ -288,7 +288,7 @@ class Misc:
|
||||||
if add: add = '+'
|
if add: add = '+'
|
||||||
name = self._register(func, self._substitute)
|
name = self._register(func, self._substitute)
|
||||||
self.tk.call('bind', 'all' , sequence,
|
self.tk.call('bind', 'all' , sequence,
|
||||||
(add + `name`,) + self._subst_format)
|
(add + name,) + self._subst_format)
|
||||||
def bind_class(self, className, sequence, func, add=''):
|
def bind_class(self, className, sequence, func, add=''):
|
||||||
if add: add = '+'
|
if add: add = '+'
|
||||||
name = self._register(func, self._substitute)
|
name = self._register(func, self._substitute)
|
||||||
|
@ -499,7 +499,7 @@ class Tk(Misc, Wm):
|
||||||
self.tk.createcommand('tkerror', _tkerror)
|
self.tk.createcommand('tkerror', _tkerror)
|
||||||
def destroy(self):
|
def destroy(self):
|
||||||
for c in self.children.values(): c.destroy()
|
for c in self.children.values(): c.destroy()
|
||||||
del self.master.children[self._name]
|
## del self.master.children[self._name]
|
||||||
self.tk.call('destroy', self._w)
|
self.tk.call('destroy', self._w)
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self._w
|
return self._w
|
||||||
|
|
|
@ -147,7 +147,7 @@ class Misc:
|
||||||
def selection_clear(self):
|
def selection_clear(self):
|
||||||
self.tk.call('selection', 'clear', self._w)
|
self.tk.call('selection', 'clear', self._w)
|
||||||
def selection_get(self, type=None):
|
def selection_get(self, type=None):
|
||||||
self.tk.call('selection', 'get', type)
|
return self.tk.call('selection', 'get', type)
|
||||||
def selection_handle(self, func, type=None, format=None):
|
def selection_handle(self, func, type=None, format=None):
|
||||||
name = self._register(func)
|
name = self._register(func)
|
||||||
self.tk.call('selection', 'handle', self._w,
|
self.tk.call('selection', 'handle', self._w,
|
||||||
|
@ -288,7 +288,7 @@ class Misc:
|
||||||
if add: add = '+'
|
if add: add = '+'
|
||||||
name = self._register(func, self._substitute)
|
name = self._register(func, self._substitute)
|
||||||
self.tk.call('bind', 'all' , sequence,
|
self.tk.call('bind', 'all' , sequence,
|
||||||
(add + `name`,) + self._subst_format)
|
(add + name,) + self._subst_format)
|
||||||
def bind_class(self, className, sequence, func, add=''):
|
def bind_class(self, className, sequence, func, add=''):
|
||||||
if add: add = '+'
|
if add: add = '+'
|
||||||
name = self._register(func, self._substitute)
|
name = self._register(func, self._substitute)
|
||||||
|
@ -499,7 +499,7 @@ class Tk(Misc, Wm):
|
||||||
self.tk.createcommand('tkerror', _tkerror)
|
self.tk.createcommand('tkerror', _tkerror)
|
||||||
def destroy(self):
|
def destroy(self):
|
||||||
for c in self.children.values(): c.destroy()
|
for c in self.children.values(): c.destroy()
|
||||||
del self.master.children[self._name]
|
## del self.master.children[self._name]
|
||||||
self.tk.call('destroy', self._w)
|
self.tk.call('destroy', self._w)
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self._w
|
return self._w
|
||||||
|
|
Loading…
Reference in New Issue