I have asked this before.

Klaus Major klaus at major-k.de
Fri Sep 2 10:54:49 EDT 2005


Hi Kevin,

> I have two functions/handlers like the following code
>
> function ThingOne
>  repeat forever
>   --Single step of long process
>   --Write to edit control
>   wait for 0 seconds with messages
>  end repeat
> end function
>
> function ThingTwo
>  --SIngle step another long process
>  --Write Edit
>  wait for 0 seconds with messages
> end function
>
> At this point I click a button invoking ThinOne then the button  
> invoking ThingTwo.  Only 1 of the functions seem to be running  
> why?  Does wait with messages not allow currently executing  
> handlers to continue until the currently handler exits?
>
> Shouldn't this alternate? If not how do you make them alternate? I  
> am aware of "send in time" but that is not the manner in which the  
> specific problem should be solved.

i have no idea, but i think that using a function for this might be  
the wrong way...?

Did you try this as handler?

on ThingOne
...
...
end ThingOne

A finction is supposed to return some value(s), so maybe the handler  
that is calling
this function might have to wait until doomsday ;-)

> Kevin

Regards

Klaus Major
klaus at major-k.de
http://www.major-k.de




More information about the Use-livecode mailing list