Page 1 of 1

Answer with "No" or "Yes" ... quit on Yes

Posted: Sat Apr 20, 2013 12:44 am
by DaveyJJ
My 11 year old and I can not figure out how to quit the app when a user clicks the "Yes" button in our answer sheet.

Code: Select all

// user clicks the quit button
on mouseUp
answer "Really quit" with "No" or Yes" as sheet
// clicking "Yes" causes the app to quit
// if "yes"
// then quit
end mouseUp
That's basically what we want to do. We've tried every imaginable permutation of this simple if statement and can't get the Yes button to respond. Thank you.

Re: Answer with "No" or "Yes" ... quit on Yes

Posted: Sat Apr 20, 2013 12:55 am
by bn
Hi Davey,

what the user chose in an answer dialog is in "it"

Code: Select all

// user clicks the quit button
on mouseUp
   answer "Really quit" with "No" or "Yes" as sheet
   // clicking "Yes" causes the app to quit
   if it is "yes" then quit
end mouseUp
Kind regards
Bernd

Re: Answer with "No" or "Yes" ... quit on Yes

Posted: Sat Apr 20, 2013 12:58 am
by DaveyJJ
bn wrote:Hi Davey,

what the user chose in an answer dialog is in "it"

Code: Select all

// user clicks the quit button
on mouseUp
   answer "Really quit" with "No" or "Yes" as sheet
   // clicking "Yes" causes the app to quit
   if it is "yes" then quit
end mouseUp
Kind regards
Bernd
Thank you so much!