Page 1 of 1

Quit and shutdownRequest

Posted: Thu Oct 04, 2012 8:21 pm
by jmburnod
Hi All,
To quit my app the user must click two times on a btw "quit".
I added a "shutdownRequest" but that is the same behavior.
What is the trick ?

Code: Select all

on debQuitter
   ExpCurJoueur
   ExpPref
   wait 1 milliseconds
   --lock messages
   quit
   if it is "Yes" then
      quit
   end if
end debQuitter

on shutdownRequest
  answer question "Are you sure you want to quit?" with "Yes" or "No"
  if it is "Yes" then pass shutdownRequest 
end shutdownRequest

on ExpCurJoueur
   put "DernierJoueur.txt" into tFile
   put unPathDansNec2() & tFile into tPath
   put gLecurJoueur into url("file:" & tPath)
end ExpCurJoueur

on ExpPref
   put UnPathDansNec2(UnInscrit) & gLeCurjoueur & "/" & "Prefs.txt" into tpathFi
   put gLesCurPrefStack into url ("file:"&tpathFi)
end ExpPref

Re: Quit and shutdownRequest

Posted: Thu Oct 04, 2012 8:52 pm
by bn
Hi Jean-Marc,

on iOS you don't let the user quit an app. He just presses the home button and the app closes. No "do you really want to quit?" dialog. It is not how apps in iOS work.

Once the user presses the "home" button you get the "shutDown" message and you do your saving then.

Kind regards

Bernd

Re: Quit and shutdownRequest

Posted: Thu Oct 04, 2012 9:15 pm
by jmburnod
Hi Bernd,
Thanks a lot. I believed that I became crazy
But it means that certain persons with whom I work cannot leave the application without the help of someone
Kind regards
Jean-Marc