Main menu puzzle

Ken Apthorpe ken.apthorpe at optusnet.com.au
Sat Feb 18 08:06:29 EST 2006


Alex
You say:
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

I'm sure this would work.  Problem is, I don't understand why.  This isn't
your problem, you've given me a solution which is more than I could expect,
thank you.

My problem with this script is:  it produces two choices, Yes or No. Buttons
I assume.  OK is handled.  Yes does not appear to be handled by anything. 
But, if it works it must be handled somehow.  But there is nothing in this
script (that I can see) to cater for a choice of Yes.

It's a dilemma.  You say this works. I believe you (on faith, not having
tried it). But I can't see how it can possibly work, because there is
nothing that appears to handle a choice of Yes.  Isn't programming supposed
to follow the script?

Or... is there some mystical dimension to these scripts... some sort of
default skypilot script or command that takes care of these messy details? 
If so, does one have to enter an order for the secret to be revealed?

Regards
ken




--
View this message in context: http://www.nabble.com/Main-menu-puzzle-t1145446.html#a3004801
Sent from the Rev Pilgrim's Progress forum at Nabble.com.




More information about the use-livecode mailing list