tablelist 6.16
Tcl/Tk 8.6.11 Linux and Windows
The following script raises an error:
package require tablelist
# tablelist::setThemeDefaults
tablelist::tablelist .t -columns { 0 title }
pack .t -fill both -expand yes
.t insert end 1
.t embedttkcheckbuttons 0
Error in startup script: can't read "isAwTheme": no such variable
while executing
"if {$isAwTheme} {
set height [winfo reqheight $w]
incr height -1
$frm configure -width $height -height $height
place $w -x 0
return [list $height..."
(procedure "makeTtkCkbtn" line 49)
invoked from within
"makeTtkCkbtn $w.ckbtn"
(procedure "::tablelist::createTtkCkbtn" line 9)
invoked from within
"::tablelist::createTtkCkbtn {} .t 0 0 .t.body.frm_k0,0.w"
("uplevel" body line 1)
invoked from within
"uplevel #0 $val [list $win $row $col $aux.w]"
(procedure "doCellConfig" line 843)
invoked from within
"doCellConfig $row $col $win $opt $val 1"
(procedure "fillcolumnSubCmd" line 57)
invoked from within
"fillcolumnSubCmd $win [list $col -window [list ::tablelist::createTtkCkbtn $cmd]]"
(procedure "embedttkcheckbuttonsSubCmd" line 16)
invoked from within
"${cmd}SubCmd $win [lrange $args 1 end]"
(procedure "tablelist::tablelistWidgetCmd" line 8)
invoked from within
".t embedttkcheckbuttons 0"
(file "t.tcl" line 11)
The variable isAwTheme in tablelist is not initialized at that point,
since it is only initialized after tablelist::setThemeDefaults has been called. If I add an
tablelist::setThemeDefaults
after the package require, the error goes away. If this call is
required, it should be documented.
Thanks
R'
This bug has already been reported by another Tablelist user, and I have fixed it for the next release. Unfortunately, it escaped my attention
that the procedure tablelist::setThemeDefaults is not automatically
invoked when using the package tablelist rather than tablelist_tile. :-(
Am 15.12.21 um 15:38 schrieb nemethi:
This bug has already been reported by another Tablelist user, and I
have fixed it for the next release. Unfortunately, it escaped my
attention that the procedure tablelist::setThemeDefaults is not
automatically invoked when using the package tablelist rather than
tablelist_tile. :-(
one follow-up question, what is the reason to use tablelist over tablelist_tile? I only use the latter one, as I'm using only ttk
widgets. Is there any advantage in using tablelist in a modern application?
Christian
Am 15.12.21 um 15:58 schrieb Christian Gollwitzer:Hi,
Am 15.12.21 um 15:38 schrieb nemethi:
This bug has already been reported by another Tablelist user, and I
have fixed it for the next release. Unfortunately, it escaped my
attention that the procedure tablelist::setThemeDefaults is not
automatically invoked when using the package tablelist rather than
tablelist_tile. :-(
one follow-up question, what is the reason to use tablelist over tablelist_tile? I only use the latter one, as I'm using only ttk
widgets. Is there any advantage in using tablelist in a modern application?
Christian
I cannot see any advantage in using tablelist rather than tablelist_tile
in a modern application, in which native look & feel is an important requirement. The combination
package require tablelist
. . .
.t embedttkcheckbuttons 0
^^^
is a less common one.
--
Csaba Nemethi https://www.nemethi.de mailto:csaba....@t-online.de
* nemethi <csaba.nemethi@t-online.de>
| > one follow-up question, what is the reason to use tablelist over
| > tablelist_tile? I only use the latter one, as I'm using only ttk
| > widgets. Is there any advantage in using tablelist in a modern
| > application?
--<snip-snip>--
| I cannot see any advantage in using tablelist rather than
| tablelist_tile in a modern application, in which native look & feel is
| an important requirement.
I was under the impression that tablelist_tile is a relict of these old
days when ttk was not in the core - now it looks like I'm the relict ;-)
Since tablelist works so good, I never had any reason to dig deeper.
But I will have a closer look again, though all these "this option is
only available in tablelist, but not in tablelist_tile" scare me off a bit.
R'
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 285 |
Nodes: | 16 (2 / 14) |
Uptime: | 23:56:23 |
Calls: | 6,448 |
Files: | 12,050 |
Messages: | 5,254,174 |