Delay help, please

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Delay help, please

Kirk W. Fraser
I'm using the free version of Dolphin and have some code which calls .dll's
which work on outside processes.  To test, I have have a method with several
Delay statements such as:

Delay forSeconds: 120.

My understanding is this should stop the processing of the method at that
point for 2 minutes, which is more than enough time to conclude the external
processes.  Then I'm guessing the method should continue normally until the
next Delay.  But it seems to ignore the delay statements and processes along
at its own timing, resulting in often sending correct messages to the wrong
external programs.

Is my useage wrong -- if so please correct me.  Or is there a bug?  Of
course if I addressed only one external program there would be less problem
but I want to lash together external TV and FTP applications to make my own
webcam.

Thank you.


Reply | Threaded
Open this post in threaded view
|

Re: Delay help, please

Jeffrey Odell-2
Here is the comment from the method in Dolphin 4.0.  It may not be in the
2.1 version you are using.  In a nutshell - you have to send wait to this
instance - #forSeconds: is an instantiator but does not initiate the wait.

jlo

"Answer a new instance of the receiver with a duration of secondCount
seconds.
The new instance has no effect on the progress of a Process until sent the
message #wait. A Delay instantiated for a particular duration (as opposed to
one
instantiated for an absolute millisecond time) can be used repeatedly (i.e.
the
#wait message can be sent to it more than once, though at any one time only
one
Process can be waiting for a Delay)."

"Kirk W. Fraser" <[hidden email]> wrote in message
news:Kyf88.128$[hidden email]...
> I'm using the free version of Dolphin and have some code which calls
.dll's
> which work on outside processes.  To test, I have have a method with
several
> Delay statements such as:
>
> Delay forSeconds: 120.
>
> My understanding is this should stop the processing of the method at that
> point for 2 minutes, which is more than enough time to conclude the
external
> processes.  Then I'm guessing the method should continue normally until
the
> next Delay.  But it seems to ignore the delay statements and processes
along
> at its own timing, resulting in often sending correct messages to the
wrong
> external programs.
>
> Is my useage wrong -- if so please correct me.  Or is there a bug?  Of
> course if I addressed only one external program there would be less
problem
> but I want to lash together external TV and FTP applications to make my
own
> webcam.
>
> Thank you.
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Delay help, please

Bruno Brasesco
In reply to this post by Kirk W. Fraser
>
> Delay forSeconds: 120.
>

Try this:

(Delay forSeconds: 120) wait.

" this message 'tells' to the Delay instances to wait "


Best Regards
Bruno Buzzi Brasesco