Tk Source Code

View Ticket
Login
2004-04-02
22:49 Ticket [870844ffff] WinTk: many menus in menubar won't popup status still Open with 6 other changes artifact: d135cb1195 user: vincentdarley
2004-01-07
01:29 Ticket [870844ffff]: 4 changes artifact: 1288548b8e user: vincentdarley
2004-01-05
18:22 Add attachment menutest.tcl to ticket [870844ffff] artifact: 3d6f82883d user: vincentdarley
18:22 Ticket [870844ffff] many menus in menubar won't popup status still Open with 4 other changes artifact: 26e0c5291f user: vincentdarley
11:22 New ticket [870844ffff]. artifact: 8ac27e7770 user: vincentdarley

Ticket UUID: 870844
Title: WinTk: many menus in menubar won't popup
Type: Bug Version: obsolete: 8.4.6
Submitter: vincentdarley Created on: 2004-01-05 11:22:43
Subsystem: 13. Win Menus Assigned To: tmh
Priority: 5 Medium Severity:
Status: Open Last Modified: 2004-04-02 22:49:47
Resolution: None Closed By:
    Closed on:
Description:
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
User Comments: vincentdarley added on 2004-04-02 22:49:47:
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

vincentdarley added on 2004-01-07 01:29:13:
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....

vincentdarley added on 2004-01-05 18:22:43:

File Added - 72300: menutest.tcl

Attachments: