Message188778
Python version: 3.3.0 32bit
OS: Windows 7 Service Pack 1 64bit
The peer_create method of the Text class, introduced in changeset
<71041c0dedd5> in response to issue <2843> creates a tk text widget
but does not instantiate Text. Because they don't exist as Python
objects, we have to use tk.call() to manipulate them. This also breaks
the nametowidget method used with Text's peer_names, again because
these widgets don't exist in Python.
Following the inheritance of Text in /Lib/tkinter/__init__.py:2039
Text > Widget > BaseWidget, where the actual widget creation occurs
with a call to self.tk.call:
self.tk.call(
(widgetName, self._w) + extra + self._options(cnf))
We cannot smuggle in the tk command '.myoriginaltext peer create' as
a tuple in place of the widgetName ('text') because we end up with the
malformed argument:
((.myoriginaltext, 'peer', 'create'), .peer.path ...)
The attached file is my second attempt, using subclassing.
Lot of code duplication, ugly and not thoroughly tested: I'm hoping a
more elegant solution can be found. |
|
Date |
User |
Action |
Args |
2013-05-09 14:36:22 | ghoul | set | recipients:
+ ghoul, gpolo |
2013-05-09 14:36:22 | ghoul | set | messageid: <1368110182.39.0.238603513669.issue17945@psf.upfronthosting.co.za> |
2013-05-09 14:36:22 | ghoul | link | issue17945 messages |
2013-05-09 14:36:22 | ghoul | create | |
|