Sample code:
package require Tk
menu .mymenu
. configure -menu .mymenu
puts [winfo children .]
Using Tcl 8.6, this prints out:
.mymenu .#mymenu
I'm confused where the .#mymenu
identifier comes from.
Note that when using this same code on an explicitly created toplevel window (since .
is the implicitly generated window in Tk), the results are different:
package require Tk
toplevel .win
menu .win.mymenu
. configure -menu .win.mymenu
puts [winfo children .win]
This prints:
.win.mymenu
This seems like the proper behavior. So why is the result different for the implicitly generated window in the first sample code?