More hierarchical menu problems

Tim tim11 at bellatlantic.net
Fri Feb 8 02:12:01 CST 2002


On 2/8/02 1:43 AM, "yves COPPE" <yvescoppe at skynet.be> wrote:

>> 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.

Thanks to all. A combination of chant, secret handshakes, and code
correction fixed the problem.
-- 
Tim




More information about the use-livecode mailing list