Main menu puzzle

Alex Tweedly alex at tweedly.net
Sat Feb 18 06:37:40 EST 2006


Alex Tweedly wrote:

an incomplete answer. While I was right that the "end exit" was what was 
leading directly to the error hint of 'on', I missed another problem in 
your script.

> Ken Apthorpe wrote:
>
>> After exploration to discover an Exit/Quit script, my script is:
>> on menuPick pWhich
>>  switch pWhich
>>  case "Exit"
>>  on "Exit" answer "Are you sure you want to exit?" with "Yes" or "OK"
>>     if it is "OK" then quit
>> end "Exit"
>> break
>
You also don't need the 'on "Exit"' part. So this should be simply

on menuPick pWhich
    switch pWhich
        case "Exit"
            answer "Are you sure you want to exit?" with "Yes" or "OK"
            if it is "OK" then quit
            break
        case "Quit"
           answer ....
           if it is "OK" then ...
           break
    end switch
end menuPick


-- 
Alex Tweedly       http://www.tweedly.net



-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: 17/02/2006




More information about the Use-livecode mailing list