Message266851
To make the experiment easy to repeat, say after the patch, I wrote this. (Perhaps inspired by Ned Batchelder's 'machete debugging' PyCon talk.)
import tkinter as tk
from idlelib.configdialog import ConfigDialog
_realsetup = tk.BaseWidget._setup
def _wrapsetup(self, master, cnf):
_realsetup(self, master, cnf)
print(self.widgetName, self._w)
tk.BaseWidget._setup = _wrapsetup
root = tk.Tk()
ConfigDialog(roo)
ttk.BaseWidget._setup = _realsetup
Observations: the longest path rather long: .<num1>.....<num9>. The root to widget paths collectively represent a tree and, sorted, could be used to populate a tree widget, such as a Treeview. With the proposed new names, this would give one a useful overview of the total gui, or a part thereof.
If one subclasses a widget, such as class MyFrame(Frame, would the instance .widgetName used in the patch 'Frame' or 'MyFrame'? The latter would make the treeview really useful, and reward judicious subclassing. |
|
Date |
User |
Action |
Args |
2016-06-02 00:50:35 | terry.reedy | set | recipients:
+ terry.reedy, serhiy.storchaka |
2016-06-02 00:50:35 | terry.reedy | set | messageid: <1464828635.15.0.23712648422.issue27025@psf.upfronthosting.co.za> |
2016-06-02 00:50:35 | terry.reedy | link | issue27025 messages |
2016-06-02 00:50:33 | terry.reedy | create | |
|