James Newton <[EMAIL PROTECTED]>

> -- Timer ---------------------------------------
> -- (Parent script)
> ------------------------------------------------
>
> property pStartTime -- the milliseconds on new()
>
> on new(me)
>   pStartTime = the milliseconds
>
>   return me
> end new
>
>
> on TimeElapsed(me)
>   return pStartTime - the milliseconds
> end
>
> ------------------------------------------------
>
> In the Message window:
>
>   t = script("Timer").new()
>   put t.TimeElapsed()
>   -- 1431

Hi James,

when i pasted this script to a parent one into d8.5.1 and invoked the getter
method the time was given in a negative manner. I tried to change this line:

>   return pStartTime - the milliseconds

to this:

>   return the milliseconds - pStartTime

and then it worked fine.

Must've been the type.

All the best
Petro



[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[email protected]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to