invalid command name "toplevel"
    while executing
"toplevel .a"
    (in namespace eval "::request" script line 1)
    invoked from within
"namespace eval ::request $script"
    ("::try" body line 12)

OUTPUT BUFFER:

toplevel .a button .a.b -text "here is .a.b\net hop" -bg green pack .a.b toplevel .b button .b.b -text "hre is .b.b\n et re-hop" -bg red pack .b.b toplevel .c button .c.b -text "hre is .c.b\n et fini les hop" -bg cyan pack .c.b proc ToggleW {key} { puts "Press $key" set Lt [wm stackorder .] set Ht [lindex $Lt end] if {$Ht eq "."} {set Ht [lindex $Lt end-1]} set Bs [lindex $Lt 0] if {$Bs eq "."} {set Bs [lindex $Lt 1]} lower $Ht raise $Bs focus $Bs return } #bind . [list ToggleW %K] #bind .a [list ToggleW %K] #bind .b [list ToggleW %K] #bind .c [list ToggleW %K] bind all {puts "key= %K"} bind all [list ToggleW "%K"] bind all [list ToggleW "%K"]