• tablelist TCL error

    From Ralf Fassel@21:1/5 to All on Wed Dec 15 12:28:25 2021
    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'

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From nemethi@21:1/5 to All on Wed Dec 15 15:38:47 2021
    Am 15.12.21 um 12:28 schrieb Ralf Fassel:
    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. :-(

    --
    Csaba Nemethi https://www.nemethi.de mailto:csaba.nemethi@t-online.de

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Christian Gollwitzer@21:1/5 to All on Wed Dec 15 15:58:11 2021
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From nemethi@21:1/5 to All on Wed Dec 15 19:25:09 2021
    Am 15.12.21 um 15:58 schrieb Christian Gollwitzer:
    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.nemethi@t-online.de

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Nicolas@21:1/5 to All on Thu Dec 16 01:20:01 2021
    Le mercredi 15 décembre 2021 à 19:25:14 UTC+1, nemethi a écrit :
    Am 15.12.21 um 15:58 schrieb Christian Gollwitzer:
    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
    Hi,
    I was using tablelist instead of tablelist_tile because of some options not available from tablelist_tile (which is normal)
    I've switched to tablelist_tile, it took some times... but now I'm happy with look and feel :)

    ++
    Nicolas

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ralf Fassel@21:1/5 to All on Thu Dec 16 11:31:19 2021
    * 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'

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From nemethi@21:1/5 to All on Thu Dec 16 13:19:22 2021
    Am 16.12.21 um 11:31 schrieb Ralf Fassel:
    * 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'


    The reason why some configuration options are not supported by the
    package Tablelist_tile is that they are not supported by the tile
    engine. The section "More on Tablelist_tile" of "Tablelist Programmer's
    Guide" contains more details on this. The lack of support for these
    options is richly compensated by the many (internal) theme-specific
    settings that are responsible for a true native look, which you get w/o
    any extra effort when you load Tablelist_tile.

    --
    Csaba Nemethi https://www.nemethi.de mailto:csaba.nemethi@t-online.de

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)