More hierarchical menu problems
yves COPPE
yvescoppe at skynet.be
Thu Feb 7 20:45:00 EST 2002
>Hi,
>
>I have a button menu with 3 items and two of those items contain 2 sub-items
>each. The script is fairly straightfoward:
>
>On menuPick
>switch tChosen
> case "item1"
> statements
> break
> case "item2"
> statements
> break
> case "item3"
> statements
> break
> case "sub-item1a"
> statements
> break
> case "sub-item1b"
> statements
> break
>case "sub-item2a"
> statements
> break
>case "sub-item2b"
> statements
> break
> end switch
>end menuPick
>
>When I select any sub-items I get statements executed as though I selected
>some other items. The hierarchical menu is configured with returns and tabs
>and looks OK. Could this be a bug?
>--
>Tim
>
>
When you select a subitem, you must write :
case "Item x|subitem ax"
statements
break
case "Item x|subitem bx"
statements
break
The parent menu must be written followed by "|" and the subitem menu
Good luck.
--
Salutations.
Yves et Franoise COPPE
Email : yvescoppe at skynet.be
More information about the use-livecode
mailing list