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

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
liveme
Posts: 240
Joined: Thu Aug 27, 2015 5:22 pm
Location: down under

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

Post by liveme » Fri Apr 23, 2021 2:12 am

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:

liveme
Posts: 240
Joined: Thu Aug 27, 2015 5:22 pm
Location: down under

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

Post by liveme » Fri Apr 23, 2021 2:22 am

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 ?

liveme
Posts: 240
Joined: Thu Aug 27, 2015 5:22 pm
Location: down under

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

Post by liveme » Fri Apr 23, 2021 5:47 am

solved !

Code: Select all

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

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”