wait for 1.2 seconds with messages -- twice hangs

Steven Zins steven_zins at yahoo.com
Fri Apr 2 22:15:14 EST 2004


It appears that when two "wait for N seconds with messages"
statements are used, one handler blocks the other.

The following code is in a card script:

on test0 -- cause other two handlers to start after this one ends
  send test1 to me in 0 seconds
  send test2 to me in 0 seconds
end test0

on test1
  repeat forever
    put test1&return after field "Log" of group "grp"
    wait for 1 seconds with messages
  end repeat
end test1

on test2
  repeat forever
    put test2&return after field "Log" of group "grp"
    wait for 1 seconds with messages
  end repeat
end test2




The result of sending a message to test0 is:
test1
test2
test2
test2
test2
test2
... 

If I then set a breakpoint in the test2 handler to stop the loop and
then press abort, the test1 handler resumes functioning.

I am running Runtime Revolution 2.1.2 on Windows 2000. I am using the
debug environment but Suspend Development Tools doesn't improve
matters.

Am I doing something wrong? Should this work with test1 and test2 on
different cards? Different stacks? A stand-alone application?  Must I
chop my code up to into pieces and use "send .. in N seconds" in
order to get a time delay?

Speculation: "wait for N seconds with messages" allows other handlers
to respond to messages but does not allow a handler to resume after a
wait.

Any help is appreciated.

Steven Zins
Steven_Zins at yahoo.com




__________________________________
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/


More information about the use-livecode mailing list