[NTLK] NewtonScript question: How to restart the Application from within the application
Matej Horvat
matej.horvat at guest.arnes.si
Sat Mar 12 21:30:07 PST 2022
AddDeferredAction should do the trick. It queues a function to be executed
the next time the system is idle again:
local App := GetRoot().(kAppSymbol);
AddDeferredAction(func() App:Open(), '[]);
App:Close();
If not, try AddDelayedAction, which takes the number of milliseconds as
the third parameter.
(Neither AddDeferredAction nor AddDelayedAction is documented in the
Newton Programmer's Reference 2.0 because Newton Programmer's Guide 2.0
says on page 894 that you should use other 2.x-only functions instead, but
they work just fine and are your only choice if you want to remain
1.x-compatible.)
More information about the NewtonTalk
mailing list