[NTLK] NewtonScript question: How to restart the Application from within the application

Avi Drissman avi at drissman.com
Sat Mar 12 19:12:05 PST 2022


Apps as they exist on desktop don’t exist on the Newton so that’s not something I’d imagine would work. My initial thought when I saw this email was to spawn some kind of delayed timer or callback, but I couldn’t find any timer api in the newtonscript book I searched in. 

> On Mar 12, 2022, at 9:32 PM, David Arnold <davida at pobox.com> wrote:
> 
> 
>> 
>> On 13 Mar 2022, at 11:19, NewtonTalk <newtontalk at pda-soft.de> wrote:
>> 
>> Hi gang,
> 
> <…>
> 
>> Any ideas?
> 
> Perhaps, this is not dissimilar to the problem of applications updating themselves (on desktop platforms)?  The usual approach there is to have a second, small application which does the restart.  Things like Sparkle, and Google Chrome’s update framework, among others, take this approach.
> 
> So …
> 
> MainApp spawns HelperApp.
> MainApp exits.
> HelperApp checks if MainApp is running.  If it is, it tries to kill it, and loops until it’s dead.
> HelperApp starts MainApp.
> HelperApp exits.
> MainApp checks if HelperApp is running.  If it is, it tries to kill it, and loops until it’s dead.
> MainApp does it’s usual startup, and etc.
> 
> Perhaps something like this would be possible?
> 
> 
> 
> 
> d
> 
> ----------------------------------------------------------------------
> 
> http://newtontalk.net
> http://twitter.com/newtontalk


More information about the NewtonTalk mailing list