I finally got cascaded menus to work. (vTcl 1.08)
It seems that if you ever click the "update" button on a cascade menu
in the Editing Menu, you can never double-click it to edit the cascaded
menu again. Not even if you save the application and quit and restart vTcl
and reload the app.
For example, this fails:
o set Entry Type = cascade
o leave Entry Label blank
o click add
o at this point, dbbl-click to edit cascade is OK
o fill in the Entry Label and/or Accelerator and click Update
o now dbbl-click to edit no longer works
If you fill in the Entry Label and Accelerator before Adding, and _don't
use the update button, dbbl-click to edit the cascade is OK.
The bug doesn't seem to effect COMMAND menu items. Using the Update
button on a COMMAND has no ill effect.
If it helps any, I discovered the following as I was trying to figure
out what was going wrong:
When the menu edit of a cascade is in the situation where dbbl-clicking
will not edit the cascade, the command that returns the arguments to
vTcl:edit_menu returns a blank. IE my "puts" statement below prints
args=
instead of
args=.top17.fra18.cpd19.05.06.men23
proc vTcl:menu_item_act {base target} {
global vTcl
set list $base.fra19.lis35
set num [$list curselection]
if {"$num" == ""} {return}
set type [$target type $num]
switch $type {
cascade {
puts "args=[$target entrycget $num -menu]"
vTcl:edit_menu [$target entrycget $num -menu]
}
That's as far as I looked into it before I stumbled on a sequence that
worked. Hope this helps.
...RickM...