Page 1 of 1

Best way to leave your stack ? (without hurting its feelings)

Posted: Fri Apr 23, 2021 2:12 am
by liveme
Hi ppl,

So, I'm coding my first "stack leaving" here...and I get twice the msg "do you want to quit".
....plus...it does not even quit !!!

goal is to display a msg box, make sure the user wants to quit, save all possible changes before...and close the App.

So whats missing in that Doc. code ?

Code: Select all

on closeStackRequest 
 answer "Are you sure?" with "No" or "Yes"
 if it is "Yes" then pass closeStackRequest 
 pass closeStackRequest // << with or without this line = same repeating question :0 !
end closeStackRequest
:shock:

Re: Best way to leave your stack ? (without hurting its feelings)

Posted: Fri Apr 23, 2021 2:22 am
by liveme
Shouldn t it be s/t like :

Code: Select all

on closeStackRequest 
 answer "Are you sure?" with "No" or "Yes"
 if it is "Yes" then 
 pass closeStackRequest     // command would be send on the following line AFTER "Then"....and no "end if"..??  :shock: 
end if
end closeStackRequest

..or does this only work after the app was built ?

Re: Best way to leave your stack ? (without hurting its feelings) solved

Posted: Fri Apr 23, 2021 5:47 am
by liveme
solved !

Code: Select all

   if it is "yes" then  
      quit
   end if
quit the app...no the stack !!! ahhhh
:lol: