The attached script recursively creates some submenus
in a menubar. Unfortunately, only the first menu
actually pops up (in any of Tk 8.3/8.4/8.5), and
attempting to launch two wish processes with this
script simply fails (subsequent processes don't manage
to launch, it seems).
This is on WinXP
catch {console show}
proc mr {w count e} {
for {set i 0} {$i < 5} {incr i} {
if {$e} {
$w insert end command \
-label "entry$count$i" -command "foo $i"
}
if {$count > 0} {
set m $w.m$count$i
menu $m
$w insert end cascade \
-label "sub$count$i" -menu $m
mr $m [expr {$count -1}] 1
}
}
}
proc foo {args} {
puts stderr $args
}
menu .mb
. configure -menu .mb
mr .mb 5 0
update
test script showing problem
Logged In: YES
user_id=32170
This seems to be some sort of windows resource leak or
similar issue. After running this script, I can't open any
other windows (even other applications). Such actions simply
fail....
Logged In: YES
user_id=32170
Appears to be the code grabbing large numbers of "USER
handle objects". The odd thing is the it seems to construct
the menus ok, but then it is only when trying to post them
that everything fails.
Bug still in 8.5a2