Re: [NTLK] NewtonScript: SetupIdle() and multiple NTK sessions in Classic

From: Steve Weyer (weyer_at_kagi.com)
Date: Sat Mar 16 2002 - 06:34:12 EST


> Date: Fri, 15 Mar 2002 16:58:27 -0500
> From: Jim Witte <jswitte_at_bloomington.in.us>
>
>
> What does SetupIdle take as a parameter? The NPG say's it takes a
> delayvalue in milliseconds,

that's right. initial delay until viewIdleScript is called the first time.

:setupIdle(0) turns off idle

>but the Clock example has the line
> ":SetupIdle(:viewIdleScript());" indication the path of the idle
> script. The line ":SetupIdle(0)" doesn't work, but Adam Tow's
> AlaramClock includes SetupIdle(0) in a number of places.

:viewIdleScript returns either number of milliseconds before viewIdleScript
is called again; or nil to terminate (same as :setupidle(0))

:setupidle(:viewIdleScript())
would run the script explicitly directly, and then set up the idle mechanism
to call it the second time (assuming viewIdleScript didn't happen to return
nil, which would be a bug)

-- 
Steve
  weyer_at_kagi.com
Newton apps/tools: Newt's Cape, newtVNC, NewtDevEnv, Sloup, Crypto,...
  http://www.kagi.com/weyer/

-- Read the List FAQ/Etiquette: http://www.newtontalk.net/faq.html Read the Newton FAQ: http://www.guns-media.com/mirrors/newton/faq/ This is the NewtonTalk mailing list - http://www.newtontalk.net



This archive was generated by hypermail 2.1.2 : Tue Apr 02 2002 - 14:02:57 EST