From: Vince D. <vi...@sa...> - 2004-04-22 20:31:57
|
This simple test case illustrates a bug in TkAqua's menu handling: menu .menu menu .menu.one proc rebuild {} { destroy .menu.one.two menu .menu.one.two for {set i 0} {$i < 10} {incr i} { .menu.one.two add command -label "item $i" -command "puts $i" } .menu.one.two add command -label "rebuild" -command rebuild } rebuild .menu.one add cascade -menu .menu.one.two -label "sub" .menu.one add command -label dummy .menu add cascade -menu .menu.one -label "test" . configure -menu .menu Paste the above code into TkAqua's console, click on the main window to have the 'test' menu appear in the main OS menubar and then go down to the submenu and select 'rebuild'. This command will destroy the menu, but then rebuild it as is so everything should be the same. However, if you return to the menubar and try to post the submenu again, you'll find it won't post. Now click over to the Finder, or some other application and then back to Wish, and you'll find the menu now works! -- Vince |