Menu

#1642 WinTk: many menus in menubar won't popup

obsolete: 8.4.6
open
5
2004-04-02
2004-01-05
No

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

Discussion

  • Vince Darley

    Vince Darley - 2004-01-05

    test script showing problem

     
  • Vince Darley

    Vince Darley - 2004-01-06

    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....

     
  • Vince Darley

    Vince Darley - 2004-04-02

    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

     
  • Vince Darley

    Vince Darley - 2004-04-02
    • milestone: 352720 --> obsolete: 8.4.6
    • summary: many menus in menubar won't popup --> WinTk: many menus in menubar won't popup
     
MongoDB Logo MongoDB