Confirm message

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
melong
Posts: 7
Joined: Fri Aug 07, 2015 1:27 am

Confirm message

Post by melong » Mon Aug 17, 2015 11:06 pm

is it possible, in live code, to create a confirm message? For instance, once you close an app, etc. a message appears that says "you are about to close this app. Do you want to continue?" YES. NO.

Martin Koob
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 256
Joined: Sun May 27, 2007 8:19 pm

Re: Confirm message

Post by Martin Koob » Tue Aug 18, 2015 5:24 am

You can trap closeStackRequest in your main stack

Code: Select all

on CloseStackRequest
   answer info "You are about to close this app. Do you want to continue?" with "Yes" or "No"
   if it = "Yes" then
        -- passing closestackrequest will close stack:
       PASS closestackrequest
   end if
   --if you don't pass closestackrequest the app wont close
end CloseStackRequest

Martin

melong
Posts: 7
Joined: Fri Aug 07, 2015 1:27 am

Re: Confirm message

Post by melong » Wed Aug 19, 2015 2:08 am

Thanks Martin,

I'll let you know how it goes.

Mike

Post Reply