enable and disable submenu items
mkoob at rogers.com
Thu Jan 22 13:42:47 CST 2009
After more testing I realize what is going on. The 'enable menuitem'
command places the '(' at the begining of the line that contains the
submenu before the tab which makes it no longer a sub menu. If you
disable a sub menu from the Menu Builder it correctly places the '('
after the tab and in front of the menuitem's text.
I can get it to work correctly by changing the line in the menu item ie.
put 3 into itemnumber
put "from target..." into itemtext
if menuaction is "enable" then
--enable submenu item
put tab & Itemtext into line itemnumber of button "File"
--disable submenu item
put tab & "(" & Itemtext into line itemnumber of button "File"
Doing this will get the correct behavior. However it would be better if
enable menuitem could handle this.
More information about the use-livecode