Wait with messages

Camm29 Camm29 at tesco.net
Sat Feb 23 12:31:58 EST 2008


Thanks for that ,

1 is put into x within a button script on mouseup .

> Why do i check (x=1) 2 times ?

Well I actually check for(x=1) 10 times ?!
I think I've missed the concept of messages
I thought if not checking for x after each function in the loop it would
mean 10 x 250ms wait to exit ????

Each do something (10 off ) in the loop retrieves different data (each takes
250ms) via the rs232 port and displays
on a card in real time until the stop button is pressed.

Thanks in advance
Camm

----- Original Message -----
From: "Mark Schonewille" <m.schonewille at economy-x-talk.com>
To: "How to use Revolution" <use-revolution at lists.runrev.com>
Sent: Friday, February 22, 2008 1:37 PM
Subject: Re: Wait with messages


> Hi Curry,
>
> There might be a problem caused by the fact that the script is
> currently running, but since I don't see how you change x, I am not
> sure about this. Usually, I use a custom property or the hilite of a
> button rather than a variable (which in your case seems to be set and
> read in the same script). Also, I can imagine that waiting with
> messages halfway the repeat loop doesn't work perfectly. I always put
> the wait statement at the end of the loop.
>
> Also, the repeat loop itself doesn't run with messages. What always
> works for me is:
>
> repeat forever with messages -- I rarely use forever btw
>    if someCondition then
>      -- do something
>    else exit repeat
>    wait 0 millisecs with messages
> end repeat
>
> You might need to re-think the design of your repeat loop. Why do you
> need to check x two times? Is it possible for the user to determine
> whether s/he will click before the first or the second wait statement?
>
> Best regards,
>
> Mark Schonewille
>
> --
>
> Economy-x-Talk Consulting and Software Engineering
> http://economy-x-talk.com
> http://www.salery.biz
>
> Convert colours between different colour spaces with Color Converter.
> Download at http://economy-x-talk.com/cc.html
>
>
>
> Op 22-feb-2008, om 14:24 heeft <camm29 at tesco.net> <camm29 at tesco.net>
> het volgende geschreven:
>
> > I have a loop with :-
> >
> > repeat
> > ..... do something (takes about 250ms)
> > wait 1 millisecond with messages
> > if x=1 then exit repeat
> > ..... do something (takes about 250ms)
> > wait 1 millisecond with messages
> > if x=1 then exit repeat
> > end repeat
> >
> > I have a button that makes x =1 to exit 1 card and go to another
> >
> > The seems to be a larger delay than i expected to exit the repeat
> > 2-5 secs ????
> >
> > Any ideas how to exit repeat very fast ???
> >
> > Thanks in advance !
> >
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.516 / Virus Database: 269.20.8/1288 - Release Date:
19/02/2008 20:47
>
>




More information about the use-livecode mailing list