Hi
What you think about one (or more) private options for a widget to store information on a widget.
Maybe to store the object which created the widget.
This private option should not influence the widget.
It's only like a variable.
The name could be "private" or "store" or "myoption" or something else.
ttk::button .bu -text nix -private "object0815"
And with ".bu cget -private" I get the information.
Could this be usefull?
Hi
What you think about one (or more) private options for a widget to store information on a widget.
Maybe to store the object which created the widget.
This private option should not influence the widget.
It's only like a variable.
The name could be "private" or "store" or "myoption" or something else.
ttk::button .bu -text nix -private "object0815"
And with ".bu cget -private" I get the information.
Could this be usefull?
regards
Manfred
Hi
What you think about one (or more) private options for a widget to store information on a widget.
Maybe to store the object which created the widget.
This private option should not influence the widget.
It's only like a variable.
The name could be "private" or "store" or "myoption" or something else.
ttk::button .bu -text nix -private "object0815"
And with ".bu cget -private" I get the information.
On Wed, 8 Oct 2025 20:27:37 +0200
Manfred Stelzhammer <manfred@antispam.at> wrote:
Hi
What you think about one (or more) private options for a widget to store
information on a widget.
Maybe to store the object which created the widget.
This private option should not influence the widget.
It's only like a variable.
The name could be "private" or "store" or "myoption" or something else.
ttk::button .bu -text nix -private "object0815"
And with ".bu cget -private" I get the information.
Could this be usefull?
This issue is addressed in TIP 729
https://core.tcl-lang.org/tips/doc/trunk/tip/729.md
This TIP is currently being voted and, should it be accepted, it will
be in Tk 9.1 (next release).
There are two older TIP which tries to address the same subject:
369 and 349
https://core.tcl-lang.org/tips/doc/trunk/tip/369.md https://core.tcl-lang.org/tips/doc/trunk/tip/349.md
These proposals have the same drawback: all widgets, both core and third-party, must be modified to support this option or subcommand.
The advantage of the TIP 729 proposal is twofold: it can be applied to
any widget without modification, and different packages can have their
own private attribute tables with whatever data they define without
any name clashes. When the widget is destroyed, all related data is
cleaned up from all attribute tables.
Regards
Sysop: | DaiTengu |
---|---|
Location: | Appleton, WI |
Users: | 1,072 |
Nodes: | 10 (0 / 10) |
Uptime: | 129:26:01 |
Calls: | 13,772 |
Files: | 186,986 |
D/L today: |
255 files (119M bytes) |
Messages: | 2,429,796 |