Re: Wait with messages

2008-03-07 Thread Camm29
All ,

Problem was solved by INCREASING the wait with milliseconds ?!

Worse with wait 0 milliseconds
Original wait was 1 millisecond

Works like lightening with 5 Milliseconds ,

Now I can press a button on any card and exit the loop instantly.

Regards
Camm

- Original Message -
From: "Mark Schonewille" <[EMAIL PROTECTED]>
To: "How to use Revolution" 
Sent: Saturday, February 23, 2008 6:09 PM
Subject: Re: Wait with messages


> Oh... Camm, not Curry, so sorry for that.
>
> It is really friendly of you to thank me(?) in advance, but do you
> have any more questions or are you going to try to change your repeat
> loop now?
>
> I don't get what you want to say by
>
> > I thought if not checking for x after each function in the loop it
> > would
> > mean 10 x 250ms wait to exit 
>
> Why would it mean 2500ms wait to exit and what is it? Of course, if
> you put a wait statement in your repeat loop, like
>
> wait for 250 millisecs with messages
>
> it will delay for 250 millics, but if you look at my example, you'll
> see that waiting with 0 millisecs is sufficient, i.e. no delay unless
> other messages are being sent (such as mouseUp).
>
> 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 23-feb-2008, om 18:31 heeft Camm29 het volgende geschreven:
>
> > 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" <[EMAIL PROTECTED]>
> > To: "How to use Revolution" 
> > 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
> >>
> >>
> >>
>
> ___
> use-revolution mailing list
> use-revolution@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
>
>

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Wait with messages

2008-02-23 Thread Mark Schonewille

Oh... Camm, not Curry, so sorry for that.

It is really friendly of you to thank me(?) in advance, but do you  
have any more questions or are you going to try to change your repeat  
loop now?


I don't get what you want to say by

I thought if not checking for x after each function in the loop it  
would

mean 10 x 250ms wait to exit 


Why would it mean 2500ms wait to exit and what is it? Of course, if  
you put a wait statement in your repeat loop, like


wait for 250 millisecs with messages

it will delay for 250 millics, but if you look at my example, you'll  
see that waiting with 0 millisecs is sufficient, i.e. no delay unless  
other messages are being sent (such as mouseUp).


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 23-feb-2008, om 18:31 heeft Camm29 het volgende geschreven:


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" <[EMAIL PROTECTED]>
To: "How to use Revolution" 
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





___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Wait with messages

2008-02-23 Thread Camm29
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" <[EMAIL PROTECTED]>
To: "How to use Revolution" 
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 <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
> 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@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
>
>

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Wait with messages

2008-02-22 Thread Mark Schonewille

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 <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>  
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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Wait with messages

2008-02-22 Thread camm29
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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: canceling a "wait with messages" call...

2007-08-31 Thread Andre Garzia
Thanks all for the messages!
What I am doing is mixing async and sync behaviors. I want the network
access to go async so that it doesn't block the ui or the application but I
want the handler that started the async call to be stopped while the
transaction is happening.

The script is a Bills of Materials processor that downloads files. To
simplify the script to the point where someone else than me (I write very
obscure scripts...) can actually understand what is happening, I've opted to
a structure like this:

local lFileStatus

libURLDownloadToFile tURL, tFile, "theCallback"
wait while lFileStatus is empty with messages
...

so what happens is that the handler above loads a file using an async call
but is blocked by the wait. The callback, when it occurs, set the local
variable to some non-empty value which thus unblock that wait call allowing
that handler to further process the files.

Some may ask, "why don't you do the further processing on the callback!?".
The answer for that is: "no." (sorry, prolog joke).  The long answer is that
the solution above leads to scripts easier to maintain and easier to follow.
The good thing of using a script local variable as a flag allows me to have
other handlers doing side-effects. For example, I have my own timeout
handler that will set that flag to a non-empty-but-error value if libURL
really fails. The callback is only called by libURL, having a flag makes
easy to your code to interface with your async/sync blocking mechanism.

The trouble is, sometimes when I set that local variable to a non-empty
value, the handler does not unblock and that keeps me thinking: "why? oh why
my hanlder does not unblock when I set the very especific condition to it's
unblocking to true!?"

if there is no way to unblock that thing, then I want to finish/abort/kaput
it, which I guess I also can't do.

Dave, I got to waitdepth 6 using those handlers which got me thinking about
nested russian dolls blocking each other. Do you know if there's a way to
force a handler stopped on a wait call to resume or exit to top?

Andre
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: canceling a "wait with messages" call...

2007-08-29 Thread Dave Cragg


On 29 Aug 2007, at 18:10, Andre Garzia wrote:

Hi Andre

tricky newbie question here. I have a handler which is a looper. It  
will

loop downloading files from a queue. It uses a line:

wait while lCurrentFileStatus is empty with messages

to let the handler block (but not the application) till the  
download is

complete or blocked. Tricky thing is, if you simply unplug the network
during the FTP file transfer, revolution is giving no error, it  
waits and
blocks forever until you abort with CMD+. when it promptly sends  
the expect

"error" message back to the handler.


I don't exactly follow the details of your problem, but I'm guessing  
this is a general gotcha when using libraries that use "wait ... with  
messages" or "wait for messages" to implement asynchronous behaviour.  
As you can imagine, libUrl is full of this stuff.


When you implement a sequence of "wait ... with messages", they have  
to "unblock" in the reverse order they were used. So assuming you  
made a number of libUrl calls (vial load url, for example), and then  
used the above line, the "waits" inside libUrl won't unblock until  
the above wait unblocks. It's easy to get into an eternal wait. The  
general rule is not to use "waits" of any kind while a library (or  
any other routine) that uses asynchronous "waits" is running.


Possible ways to avoid using "waits".

-- rely on the callback message of "load url" to set things
-- use "send ... in "
-- use script-blocking calls (get url)

Sorry if I've missed the point entirely. :-)

Cheers
Dave



___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: canceling a "wait with messages" call...

2007-08-29 Thread Jim Ault
David gave you an answer that works for downloading,
but there could be other events you want to "wait
while"

Suggestion:  try a custom property
  wait while the cpBusyFlag of this stack is not empty
--since it might trigger when a script local will not
--seems like a bug to me

Another thought is to do the following to force the
re-evaluation of the flag variable

get lCurrentFileStatus
repeat while it is not empty
   get lCurrentFileStatus
   wait 1 second with messages
end repeat

Hope this helps

Jim Ault
Las Vegas

--- Andre Garzia <[EMAIL PROTECTED]> wrote:

> Hello Friends,
> tricky newbie question here. I have a handler which
> is a looper. It will
> loop downloading files from a queue. It uses a line:
> 
> wait while lCurrentFileStatus is empty with
> messages
> 
> to let the handler block (but not the application)
> till the download is
> complete or blocked. Tricky thing is, if you simply
> unplug the network
> during the FTP file transfer, revolution is giving
> no error, it waits and
> blocks forever until you abort with CMD+. when it
> promptly sends the expect
> "error" message back to the handler. I can't wait
> till the user aborts the
> call, it's not polite, so I've used another handler
> running in parallel with
> this one which is a timeout handler.
> 
> My first option was, if the timeout handler
> triggers, then I set the script
> local variable lCurrentFileStatus to some
> non-empty-but-error value and the
> looper handler would unblock itself and continue
> processing. This didn't
> work, I don't know why, this is the expected
> behaviour. A script local
> variable is used as flag and one handler blocks
> waiting for other handler to
> work with it. It works like a charm if the download
> goes okay, the message
> sent to the callback handler changes this script
> local variable and the
> handler unblocks.
> 
> If there's no network and my own timeout handler
> tries to set this variable
> to something, the handler does not unblock, instead
> of debugging libURL or
> Rev Engine or wherever the problem is, I am now
> trying to cancel the blocked
> handler. I though it would appear in the pending
> messages, but it does not.
> So the question is, how do I cancel a blocked
> handler?
> 
> Cheers
> andre
> ___
> use-revolution mailing list
> use-revolution@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and
> manage your subscription preferences:
>
http://lists.runrev.com/mailman/listinfo/use-revolution
> 

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: canceling a "wait with messages" call...

2007-08-29 Thread David Bovill
Andre - the way I've done this was by using the "libURLSetStatusCallback"
command - you can then check for anything and do your download
asynchronously. When the callback is "downloaded" then fetch the next item
from your list?
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


canceling a "wait with messages" call...

2007-08-29 Thread Andre Garzia
Hello Friends,
tricky newbie question here. I have a handler which is a looper. It will
loop downloading files from a queue. It uses a line:

wait while lCurrentFileStatus is empty with messages

to let the handler block (but not the application) till the download is
complete or blocked. Tricky thing is, if you simply unplug the network
during the FTP file transfer, revolution is giving no error, it waits and
blocks forever until you abort with CMD+. when it promptly sends the expect
"error" message back to the handler. I can't wait till the user aborts the
call, it's not polite, so I've used another handler running in parallel with
this one which is a timeout handler.

My first option was, if the timeout handler triggers, then I set the script
local variable lCurrentFileStatus to some non-empty-but-error value and the
looper handler would unblock itself and continue processing. This didn't
work, I don't know why, this is the expected behaviour. A script local
variable is used as flag and one handler blocks waiting for other handler to
work with it. It works like a charm if the download goes okay, the message
sent to the callback handler changes this script local variable and the
handler unblocks.

If there's no network and my own timeout handler tries to set this variable
to something, the handler does not unblock, instead of debugging libURL or
Rev Engine or wherever the problem is, I am now trying to cancel the blocked
handler. I though it would appear in the pending messages, but it does not.
So the question is, how do I cancel a blocked handler?

Cheers
andre
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Problem with wait with messages

2007-07-09 Thread Jim Ault

On 7/9/07 5:57 PM, "David Bovill" <[EMAIL PROTECTED]> wrote:

> Ken - what you suggest works...
> 
> but does wait with messages or wait for messages actually work? I have never
> got it working - nor have I seen any example scripts with it working - and
> the docs etc all point to doing it "another way" :)
> 

Yes, it works.  I use it in several of my apps the run a looping process
throughout the day while receiving packets from other sources, including
some of my other apps.

The incoming packets have no timing loop (thus are asynchonous) and yet are
mostly all vital, therefore cannot be missed (sometimes an app can receive
3-10 packets in less than a second).  They need to be processed as quickly
as they are received, so the 'with messages' is essential.

Further, I also allow a user to interact with the app to change settings,
interfaces, etc.. so again, "with messages" is essential.

Jim Ault
Las Vegas


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Problem with wait with messages

2007-07-09 Thread J. Landman Gay

David Bovill wrote:

Ken - what you suggest works...

but does wait with messages or wait for messages actually work? I have 
never

got it working - nor have I seen any example scripts with it working - and
the docs etc all point to doing it "another way" :)


I've used it with success. In one project, I had a stack that needed to 
show frames of an animated gif under script control. It had to wait 
between frames for an amount of time that was passed to the handler in a 
parameter. But at the same time, a user needed to be able to do other 
things, like click a button or leave the card. So I used a repeat loop 
that would play the frames while checking simultaneously for user 
actions. A simplified excerpt was something like this:


repeat with x = tStart to tStop -- a frame range
 if gFlag = true then exit repeat
 set the currentframe of img 1 to x
 wait myVar milliseconds with messages -- allows user actions
end repeat

If the user clicked a button, a mouseup was sent normally (which is what 
the "with messages" part allows) and the button script executed at the 
same time the animation was running. Depending on the user action, the 
button script either set the global flag "gFlag" so that the repeat loop 
would stop, or did something else while the looping continued.


--
Jacqueline Landman Gay | [EMAIL PROTECTED]
HyperActive Software   | http://www.hyperactivesw.com
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Problem with wait with messages

2007-07-09 Thread David Bovill

Ken - what you suggest works...

but does wait with messages or wait for messages actually work? I have never
got it working - nor have I seen any example scripts with it working - and
the docs etc all point to doing it "another way" :)

On 09/07/07, Ken Ray <[EMAIL PROTECTED]> wrote:


On Mon, 9 Jul 2007 21:41:45 +0100, Dave wrote:

> Hi All,
>
> I have a handler that gets called on a regular basis via the "send
> xxx in N seconds"  command.
>
> The handler then does some processing, but but wait for a task to
> complete, to do the wait I use:
>
> if TaskNotDone = true then
>wait 1 second with messages
> end if
>
> I thought that this would allow other objects in the stack to
> function, but this is not the case.
>
> How can I make it so that I can wait for the task to complete but
> allow the rest of the GUI to work?

I'd recommend the "wait until " method... So for example,
suppose you made "TaskDone" a global variable (I'll call it
"gTaskDone"). You can initially set gTaskDone to false, then execute
your "send in..." and then immediately after it put:

  wait until gTaskDone is true

Just be careful, because if gTaskDone is never set to true, the script
won't ever continue and you'll have issues... :-)

HTH,

Ken Ray
Sons of Thunder Software, Inc.
Email: [EMAIL PROTECTED]
Web Site: http://www.sonsothunder.com/
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Problem with wait with messages

2007-07-09 Thread Ken Ray
On Mon, 9 Jul 2007 21:41:45 +0100, Dave wrote:

> Hi All,
> 
> I have a handler that gets called on a regular basis via the "send 
> xxx in N seconds"  command.
> 
> The handler then does some processing, but but wait for a task to 
> complete, to do the wait I use:
> 
> if TaskNotDone = true then
>wait 1 second with messages
> end if
> 
> I thought that this would allow other objects in the stack to 
> function, but this is not the case.
> 
> How can I make it so that I can wait for the task to complete but 
> allow the rest of the GUI to work?

I'd recommend the "wait until " method... So for example, 
suppose you made "TaskDone" a global variable (I'll call it 
"gTaskDone"). You can initially set gTaskDone to false, then execute 
your "send in..." and then immediately after it put:

  wait until gTaskDone is true

Just be careful, because if gTaskDone is never set to true, the script 
won't ever continue and you'll have issues... :-)

HTH,

Ken Ray
Sons of Thunder Software, Inc.
Email: [EMAIL PROTECTED]
Web Site: http://www.sonsothunder.com/
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Problem with wait with messages

2007-07-09 Thread Jim Ault
You might want to do something to sniff out invisible conditions that your
events have unwittingly created:

>From the docs: -
Use the waitDepth function to determine how many wait commands are currently
awaiting completion.

Value:
The waitDepth function returns a positive integer.

Comments:
The wait with messages form of the wait command , when used in a handler,
pauses that handler while allowing Revolution to execute other handlers
while waiting. The waitDepth function indicates how many such statements are
currently executing--that is, how many handlers are currently paused by a
wait with messages statement.

If there are no paused handlers, the waitDepth function returns 1.
--
Maybe the answer lies in the 'stacking' of handlers.

Jim Ault
Las Vegas

On 7/9/07 1:41 PM, "Dave" <[EMAIL PROTECTED]> wrote:

> Hi All,
> 
> I have a handler that gets called on a regular basis via the "send
> xxx in N seconds"  command.
> 
> The handler then does some processing, but but wait for a task to
> complete, to do the wait I use:
> 
> if TaskNotDone = true then
> wait 1 second with messages
> end if
> 
> I thought that this would allow other objects in the stack to
> function, but this is not the case.
> 
> How can I make it so that I can wait for the task to complete but
> allow the rest of the GUI to work?
> 
> Thanks a lot
> All the Best
> Dave
> 
> ___
> use-revolution mailing list
> use-revolution@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Problem with wait with messages

2007-07-09 Thread David
I am not clear what you need to do: but it sounds like you want to use
the wait with messages form:

  http://handlers.rev-co.de/wiki/wait

On the other hand I have never had the need to use it - and I cannot
get "wait for messages" to work properly. Does anyone have an example
of how you can use "wait for messages" or "with messages" - I've never
got it to work?




___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Problem with wait with messages

2007-07-09 Thread Mark Smith

Assuming the handler is called "doProcess" :

on doProcess
  if taskNotDone then send "doProcess" to me in 1 second
end doProcess

Best,

Mark

On 9 Jul 2007, at 21:41, Dave wrote:


Hi All,

I have a handler that gets called on a regular basis via the "send  
xxx in N seconds"  command.


The handler then does some processing, but but wait for a task to  
complete, to do the wait I use:


if TaskNotDone = true then
   wait 1 second with messages
end if

I thought that this would allow other objects in the stack to  
function, but this is not the case.


How can I make it so that I can wait for the task to complete but  
allow the rest of the GUI to work?


Thanks a lot
All the Best
Dave

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your  
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-revolution


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Problem with wait with messages

2007-07-09 Thread Dave

Hi All,

I have a handler that gets called on a regular basis via the "send  
xxx in N seconds"  command.


The handler then does some processing, but but wait for a task to  
complete, to do the wait I use:


if TaskNotDone = true then
   wait 1 second with messages
end if

I thought that this would allow other objects in the stack to  
function, but this is not the case.


How can I make it so that I can wait for the task to complete but  
allow the rest of the GUI to work?


Thanks a lot
All the Best
Dave

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


"wait with messages" tutorial ?

2005-06-01 Thread jbv
Hi list,

Is there a (detailed) stack / tutorial about the
"wait with messages" command ?
especially when associated with a POST, and
a script waiting for the server to respond ?

Thanks,
JB (waiting for messages)

___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: wait with messages revisited.

2004-11-02 Thread K


Did that to ensure the code would not be misunderstood.  I have found that using that 
using "if gblA then " confused many newbie developers.  I find quite easy to 
understand but I was attempting to code to the lowest denominator.


-==-=-=-=-=-=-==-=-=-=-=-=-=-=-==-=-=-=-=-=-
Disclaimer:

Any resemblance between the above views and those of my
employer, my terminal, or the view out my window are purely
coincidental. 
Any resemblance between the above and my own views is non-deterministic.

 The question of the existence of views in the absence of anyone to hold
them
is left as an exercise for the reader. The question of the existence of
the reader
 is left as an exercise for the second god coefficient. 
(A discussion of non-orthogonal, non-integral polytheism is beyond the
scope of this article.)



 --- On Mon 11/01, Dar Scott < [EMAIL PROTECTED] > wrote:
From: Dar Scott [mailto: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Date: Mon, 1 Nov 2004 14:59:58 -0700
Subject: Re: wait with messages revisited.

On Nov 1, 2004, at 9:24 AM, K wrote:>if gblA is true then return 
trueAre you actually doing this?Or this? if gblA then exit 
repeatDar Dar Scott 
Consulting http://www.swcp.com/dsc/ Programming 
Services___use-revolution
 mailing list[EMAIL 
PROTECTED]http://lists.runrev.com/mailman/listinfo/use-revolution

___
Join Excite! - http://www.excite.com
The most personalized portal on the Web!
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: wait with messages revisited.

2004-11-01 Thread Dar Scott
On Nov 1, 2004, at 9:24 AM, K wrote:
   if gblA is true then return true
Are you actually doing this?
Or this?
if gblA then exit repeat
Dar

Dar Scott Consulting
http://www.swcp.com/dsc/
Programming Services

___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: wait with messages revisited.

2004-11-01 Thread K

I posted the below some days ago.  I have further questions and further infomation.

In my testing of "wait for X seconds with message":

Example code:

global gblA
global gblB

[Button A]
on mouseUp 

  repeat forever
   put "Waiting A" & return after field "status"
   if gblA is true then return true
   wait for 1 seconds with messages
  end repeat 

  put "A completed" & return after field "status"
  
end mouseUp

[Button SignalA] 
on mouseUp 
  put "Signaled A" & return into field "status"
  put true into gblA
end mouseUp

[Button SignalB]
on mouseUp
  put "Signaled B" & return into field "status"
  put true into gblB
end mouseUp

[Button B]
on mouseUp 

  repeat forever
   put "Waiting B" & return after field "status"
   if gblB is true then return true
   wait for 1 seconds with messages
  end repeat 
  
  put "B Completed" & return after field "status" 

end mouseUp

Event   Output
[Clicked A] Waiting A
[Clicked B] Waiting B
[Clicked SignalA]   
[Clicked SignalB]   B completed
    A completed

This is not the case on Win32 is different.  How is this supposed to work?  The 
documentation does not refer to any dependency for "wait  with messages" or even 
"wait until x with messages".  I am confused!!!


>Okay, some time ago everyone assisted me with understanding how "wait with >messages" 
>functions. I am still a bit confused.
>
>In my testing I found the following.
>
>Example code:
>
>[Button A]
>global evtA
>
>on mouseUp
>put "Waiting on event (A)" & cr into field edtStatus
>wait until evtA with messages
>put "Event (A) signaled" & cr into field edtStatus
>end mouseUp
>
>[Button B]
>
>global evtB
>
>on mouseUp
>put "Waiting on event (B)" & cr into field edtStatus
>wait until evtB with messages
>put "Event (B) signaled" & cr into field edtStatus
>end mouseUp
>
>[Button Clear]
>
>global evtA
>global evtB
>
>on mouseUp
>put false into evtA
>put false into evtB
>end mouseUp
>
>[Button SignalA]
>
>global evtA
>
>on mouseUp
>put true into evtA
>end mouseUp
>
>[Button SignalB]
>
>global evtB
>
>on mouseUp
>put true into evtB
>end mouseUp
>
>
>
>Test
>Click Clear Output: Nothing
>Click A Output: Waiting on event (A)
>Click B Output: Waiting on event (B)
>Click SignalA Output: Nothing
>Click SignalB Output: Waiting on event (A)
>Output: Waiting on event (B)
>
>This means that each wait is dependent on the previous A cannot be signaled >until B 
>completes. Is this the intended result?

___
Join Excite! - http://www.excite.com
The most personalized portal on the Web!
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


wait with messages revisited.

2004-10-28 Thread K

Okay, some time ago everyone assisted me with understanding how "wait with messages" 
functions.  I am still a bit confused. 

In my testing I found the following.

Example code:

[Button A]
global evtA 

on mouseUp
  put "Waiting on event (A)" & cr into field edtStatus
  wait until evtA with messages
  put "Event (A) signaled" & cr into field edtStatus
end mouseUp

[Button B]

global evtB

on mouseUp
  put "Waiting on event (B)" & cr into field edtStatus
  wait until evtB with messages
  put "Event (B) signaled" & cr into field edtStatus
end mouseUp

[Button Clear]

global evtA
global evtB

on mouseUp
  put false into evtA
  put false into evtB
end mouseUp

[Button SignalA]

global evtA

on mouseUp 
  put true into evtA
end mouseUp

[Button SignalB]

global evtB

on mouseUp
  put true into evtB
end mouseUp



Test 
Click Clear Output: Nothing 
Click A Output: Waiting on event (A)
Click B Output: Waiting on event (B)
Click SignalA   Output: Nothing
Click SignalB   Output: Waiting on event (A)
Output: Waiting on event (B)

This means that each wait is dependent on the previous A cannot be signaled until B 
completes.  Is this the intended result?


NOTE: I am using Revolution 2.2.1 on OS X since 2.5 delete my objects without warning.


Kevin



-==-=-=-=-=-=-==-=-=-=-=-=-=-=-==-=-=-=-=-=-
Disclaimer:

Any resemblance between the above views and those of my
employer, my terminal, or the view out my window are purely
coincidental. 
Any resemblance between the above and my own views is non-deterministic.

 The question of the existence of views in the absence of anyone to hold
them
is left as an exercise for the reader. The question of the existence of
the reader
 is left as an exercise for the second god coefficient. 
(A discussion of non-orthogonal, non-integral polytheism is beyond the
scope of this article.)



___
Join Excite! - http://www.excite.com
The most personalized portal on the Web!
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: wait with messages

2004-08-13 Thread Erik Hansen
--- Dar Scott <[EMAIL PROTECTED]> wrote:

> 
> On Aug 12, 2004, at 6:16 PM, Erik Hansen wrote:
> 
> > if you had your website URL as part of your
> > signoff then it would be easier to find
> > your stacks!
> 
> Like this?
> 
> Dar
> 
> 
>  Dar Scott Consulting
>  http://www.swcp.com/dsc/
>  Programming Services
> 

yeah!

now i can go to the shop and download
that messages stack.

Erik Hansen


=
[EMAIL PROTECTED]http://www.erikhansen.org




__
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: wait with messages

2004-08-12 Thread Dar Scott
On Aug 12, 2004, at 6:16 PM, Erik Hansen wrote:
if you had your website URL as part of your
signoff then it would be easier to find
your stacks!
Like this?
Dar

Dar Scott Consulting
http://www.swcp.com/dsc/
Programming Services

___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: wait with messages

2004-08-12 Thread Erik Hansen

if you had your website URL as part of your
signoff then it would be easier to find
your stacks!

Thanks for the advice,

Erik Hansen

=
[EMAIL PROTECTED]http://www.erikhansen.org



__
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: wait with messages

2004-08-11 Thread K


Thanks, I do believe now that my code is not working in the correct manner.  Honestly, 
I would prefer it worked like the VB event system were you could just doEvents to 
yeild the tasker/system (KISS).

I will rewrite the offending routines!


Kevin




-==-=-=-=-=-=-==-=-=-=-=-=-=-=-==-=-=-=-=-=-
Disclaimer:

Any resemblance between the above views and those of my
employer, my terminal, or the view out my window are purely
coincidental. 
Any resemblance between the above and my own views is non-deterministic.

 The question of the existence of views in the absence of anyone to hold
them
is left as an exercise for the reader. The question of the existence of
the reader
 is left as an exercise for the second god coefficient. 
(A discussion of non-orthogonal, non-integral polytheism is beyond the
scope of this article.)



 --- On Wed 08/11, Dar Scott < [EMAIL PROTECTED] > wrote:
From: Dar Scott [mailto: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Date: Wed, 11 Aug 2004 10:29:34 -0600
Subject: Re: wait with messages

On Aug 11, 2004, at 9:55 AM, Dar Scott wrote:>> Without polling what is 
the best way to wait (while messages continue >> processing) for a viriable state 
to change?  Since wait with messages >> is presenting several anomalies I cannot 
explain.>> One way would be to use a custom command (hander) to set the 
variable. >  It can 'send ... in 0'.  A possible problem is that it might queue up 
> several messages before execution completes and only one is needed.>> 
Another way is to call a routine to check what needs to be done at the > end of 
routines and it can do the sends.By the way, polling may not be so bad if you 
don't need a fast response.  Use a cycle like one of the flashers in the primer.  
Maybe you can poll every 100 or 200 ms or even faster.  Look at the cpu meter 
if you are concerned.In the case of something like a FIFO, you might give 
the fifo a message to send whenever it becomes empty and
  a message to send every time it become nonempty.  If you put a cycle in that to 
check the state and send the message, that is mostly a fallback and would not 
affect the normal performance.Dar 
Scott___use-revolution mailing 
list[EMAIL 
PROTECTED]http://lists.runrev.com/mailman/listinfo/use-revolution

___
Join Excite! - http://www.excite.com
The most personalized portal on the Web!
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: wait with messages

2004-08-11 Thread Dar Scott
On Aug 11, 2004, at 9:55 AM, Dar Scott wrote:
Without polling what is the best way to wait (while messages continue 
processing) for a viriable state to change?  Since wait with messages 
is presenting several anomalies I cannot explain.
One way would be to use a custom command (hander) to set the variable. 
 It can 'send ... in 0'.  A possible problem is that it might queue up 
several messages before execution completes and only one is needed.

Another way is to call a routine to check what needs to be done at the 
end of routines and it can do the sends.
By the way, polling may not be so bad if you don't need a fast 
response.  Use a cycle like one of the flashers in the primer.  Maybe 
you can poll every 100 or 200 ms or even faster.  Look at the cpu meter 
if you are concerned.

In the case of something like a FIFO, you might give the fifo a message 
to send whenever it becomes empty and a message to send every time it 
become nonempty.  If you put a cycle in that to check the state and 
send the message, that is mostly a fallback and would not affect the 
normal performance.

Dar Scott
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: wait with messages

2004-08-11 Thread Dar Scott
On Aug 10, 2004, at 2:06 PM, K wrote:
I seems that when I execute a wait with messages for a specific 
contition and another event execute a wait with messages on a 
different condition the seconds wait cancels the first.
In other mail:
Task aka event '1' is executing code but needs to wait for a variable 
to be altered by a "send in time" task '2'.  Task '2' also realizes it 
must wait on task '3' to alter a variable so it execute the wait with 
messages also.  When task '2' executes this task '1' suddenly aborts 
or returns from it's wait (even though '2' has not made any 
modification to the variable.
This seems to work for me in Rev 2.2 on OS X 10.3.4.
I made this card script:

local a
local b
on setA
  put true into a
  log "a is set"
end setA
on setB
  put true into b
  log "b is set"
end setB
on test
  put empty
  put false into a
  put false into b
  log "variables are cleared"
  log "before wait for a"
  wait until a with messages
  log "after wait for a"
  log "all done"
end test
on insideTest
  log "before wait for b"
  wait until b with messages
  log "after wait for b"
end insideTest
on log logText
  put the long time && quote & logText & quote after message
  put " a = " & a after message
  put "; b = " & b & lf after message
end log
*
I put on the card 4 buttons, one for each of commands setA, setB, test, 
and insideTest.  I labeled them such and had the mouseUp call the 
corresponding one.

On these button clicks in this order:  test, insideTest, setA, setB
...I get this result:
10:11:24 AM "variables are cleared" a = false; b = false
10:11:24 AM "before wait for a" a = false; b = false
10:11:25 AM "before wait for b" a = false; b = false
10:11:27 AM "a is set" a = true; b = false
10:11:29 AM "b is set" a = true; b = true
10:11:29 AM "after wait for b" a = true; b = true
10:11:29 AM "after wait for a" a = true; b = true
10:11:29 AM "all done" a = true; b = true
That looks right to me.  I tried some variations and those look right.  
Note that because of the nesting, the wait for a is blocked by the wait 
for b.  Looking at the time, you can see that once the setB button is 
clicked, everything wraps up.

Dar Scott
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: wait with messages

2004-08-10 Thread Troy Rollins
On Aug 11, 2004, at 1:12 AM, Richard Gaskin wrote:
The Primer on Message Mechanics might give you some ideas, too.  Find 
it here:
 http://www.swcp.com/dsc/revstacks.html
That's a wonderful tutorial Dar.  The animated message path simulation 
is great!

Thanks for posting that.
Yup. Should be required reading, and distributed with the Rev package. 
Not only is it remarkably helpful info, it has some great techniques in 
its presentation. Dar, it would be a great thing for the new 
"RevOnline" doohickey.
--
Troy
RPSystems, Ltd.
http://www.rpsystems.net

___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: wait with messages

2004-08-10 Thread Richard Gaskin
Dar Scott wrote:
The Primer on Message Mechanics might give you some ideas, too.  Find it 
here:

 http://www.swcp.com/dsc/revstacks.html
That's a wonderful tutorial Dar.  The animated message path simulation 
is great!

Thanks for posting that.
--
 Richard Gaskin
 Fourth World Media Corporation
 ___
 Rev tools and more:  http://www.fourthworld.com/rev
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: wait with messages

2004-08-10 Thread Dar Scott
On Aug 10, 2004, at 2:06 PM, K wrote:
Sorry, I did not explaine the situation well enough.  I seems that 
when I execute a wait with messages for a specific contition and 
another event execute a wait with messages on a different condition 
the seconds wait cancels the first.
The waits will nest.
You should use an event style of programming; the multi-threading style 
will not work.

You can poll with a send-in-time cycle.  Or you can use a setProp or 
other changing function, to send a message upon a change of some 
parameters or variables.

The Primer on Message Mechanics might give you some ideas, too.  Find 
it here:

 http://www.swcp.com/dsc/revstacks.html
The basic idea of the event style is that each event (user action or 
I/O event or delayed message created with send) makes a change to the 
state of your program perhaps such that other user action or I/O events 
or delayed messages are destined to come, all creating the behavior you 
want.

Dar Scott
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


RE: wait with messages

2004-08-10 Thread K


Sorry, I did not explaine the situation well enough.  I seems that when I execute a 
wait with messages for a specific contition and another event execute a wait with 
messages on a different condition the seconds wait cancels the first.

Kevin


-==-=-=-=-=-=-==-=-=-=-=-=-=-=-==-=-=-=-=-=-
Disclaimer:

Any resemblance between the above views and those of my
employer, my terminal, or the view out my window are purely
coincidental. 
Any resemblance between the above and my own views is non-deterministic.

 The question of the existence of views in the absence of anyone to hold
them
is left as an exercise for the reader. The question of the existence of
the reader
 is left as an exercise for the second god coefficient. 
(A discussion of non-orthogonal, non-integral polytheism is beyond the
scope of this article.)



 --- On Tue 08/10, K < [EMAIL PROTECTED] > wrote:
From: K [mailto: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Date: Tue, 10 Aug 2004 16:01:39 -0400 (EDT)
Subject: wait with messages

I cannot wait with messages on more than a single condition!  I this the 
intended behavior? Why can't I wait on more than one condition?  
Kevin-==-=-=-=-=-=-==-=-=-=-=-=-=-=-==-=-=-=-=-=-Disclaimer:Any
 resemblance between the above views and those of myemployer, my terminal, or the 
view out my window are purelycoincidental. Any resemblance between the above 
and my own views is non-deterministic. The question of the existence of views 
in the absence of anyone to holdthemis left as an exercise for the reader. The 
question of the existence ofthe reader is left as an exercise for the second 
god coefficient. (A discussion of non-orthogonal, non-integral polytheism is 
beyond thescope of this 
article.)___Join 
Excite! - http://www.excite.comThe most personalized portal on the 
Web!___
 use-revolution mailing list[EMAIL 
PROTECTED]http://lists.runrev.com/mailman/listinfo/use-revolution

___
Join Excite! - http://www.excite.com
The most personalized portal on the Web!
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


wait with messages

2004-08-10 Thread K


I cannot wait with messages on more than a single condition!  I this the intended 
behavior? Why can't I wait on more than one condition?  

Kevin




-==-=-=-=-=-=-==-=-=-=-=-=-=-=-==-=-=-=-=-=-
Disclaimer:

Any resemblance between the above views and those of my
employer, my terminal, or the view out my window are purely
coincidental. 
Any resemblance between the above and my own views is non-deterministic.

 The question of the existence of views in the absence of anyone to hold
them
is left as an exercise for the reader. The question of the existence of
the reader
 is left as an exercise for the second god coefficient. 
(A discussion of non-orthogonal, non-integral polytheism is beyond the
scope of this article.)



___
Join Excite! - http://www.excite.com
The most personalized portal on the Web!
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: wait with messages...

2004-02-04 Thread Scott Rossi
Recently, "Chipp Walters" <[EMAIL PROTECTED]> wrote:

> Can you provide an example where you would use one and not the other or
> not 'send'?

Chipp -- I didn't see too many other responses here so I'll chime in...

One thing I recently started using "wait with messages" for is queuing a set
of sounds for playback.  I was a staunch advocate for using "send in" to
monitor the status of media using all sorts of custom timers and what-not.
But then it occurred to me that "wait with messages" should achieve the same
result, and it seems to work great.  As a simple example:

 on playQueue pList
   repeat with N = 1 to number of items of pList
play audioClip N
wait until the sound is done with messages
wait 500 milliseconds with messages
   end repeat
 end playQueue

The above handler will play a list of audioClips sent to it with a 1/2
second delay between each clip.  Now playing audio by itself is not very
overwhelming until you realize that the above repeat loop will run virtually
asynchronously while other scripts are running: mouse tracking, button
clicks, hiding/showing images, pretty much anything.  Another way to use
"wait with messages" is card or stack initialization for any set of events
that take time to process (such as setting fileNames of players and starting
playback).

I've only just started getting into this technique but so far it involves
less scripting and maintenance than "send in" and it virtually eliminates
stray message loops winding up in the pendingMessages.  My impression is
that "wait with messages" is pretty much the same as "send in" but without
control or access to the messages being sent by the engine.  I'd like to see
Scott Raney chime on this from a technical level to know what the real
differences are, if any.

Anyway, while some folks on the list may be put off by the lack of real
"external" message threading, the "internal" threading within Rev is pretty
phenomenal once you start to play around with it.

Regards,

Scott Rossi
Creative Director
Tactile Media, Development & Design
-
E: [EMAIL PROTECTED]
W: http://www.tactilemedia.com

___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: OT wait with messages...

2004-02-01 Thread Chipp Walters
I reckon.

--- Chipp Walters <[EMAIL PROTECTED]> wrote:

YIH (yep it helps)
you talkin Tex ageein.

=
[EMAIL PROTECTED]http://www.erikhansen.org
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


RE: wait with messages...

2004-02-01 Thread erik hansen
--- Chipp Walters <[EMAIL PROTECTED]> wrote:

> YIH (yep it helps)

you talkin Tex ageein.

=
[EMAIL PROTECTED]http://www.erikhansen.org

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: wait with messages...

2004-02-01 Thread Dar Scott
On Sunday, February 1, 2004, at 02:47 AM, Dave Cragg wrote:

repeat until 
  wait for messages
end repeat
It seemed the same as this:

wait until  with messages.
I think I get it.  Use the first for testing something that will be set 
by a callback. Use the second if there is no callback as in polling the 
shift key or calling an external.

It would be nice if there was a way to filter what messages got 
processed.

Dar Scott

___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


RE: wait with messages...

2004-02-01 Thread Dave Cragg
At 12:14 am -0600 1/2/04, Chipp Walters wrote:

Would it be something like:

wait for 4 seconds with messages
I'm not sure if that will work. The old Metacard docs only show the 
"with messages" option being valid with the "wait until" or "wait 
while" variations of wait. I.e. it needs a condition. But the Rev 
docs shows it being OK with "wait for" as well.

wait for messages
(pauses handler until *any* message is received? and why would I ever use
this?)
I have a feeling there's some great power here, I just want to understand
how to use it!
This one puzzled me when I took over libUrl. It was full of snippets 
like this (and still is):

repeat until 
  wait for messages
end repeat
It seemed the same as this:

wait until  with messages.

But Scott (Raney) told me that the "wait for messages" in the repeat 
loop is much more efficient as the condition is tested only when a 
message is sent. In the single liner, the condition is tested 
continually ( a bit like "idle").

My own limited testing at the time didn't seem to show a great 
difference in how often the condition was tested. But the explanation 
seemed sensible, so I stuck with the "wait for messages" in the 
repeat loop.

Cheers
Dave
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


RE: wait with messages...

2004-02-01 Thread Martin Baxter
Regarding remote popups, I'd like to add the esoteric information that you
need to use this wait with messages conditional in standalones that run
under mac system 7 as well as windows. 68k standalones tested under
emulation on a PPC don't need this, but when run under system 7 they behave
the same as windows.

There is another subtle platform difference I've found with remote popups,
which is that if the traversalon of the remote popup button is true (the
default), the resulting menu will grab the focus under windows (and mac
system 7), but not on PPC mac. I'd guess this is a related isssue.

Martin

>For example, one thing that has been bugged in Bugzilla is that opening
>up a popup menu remotely:
>
>  popup (long id of btn "ContextPop" of card 1 of stack "MyStack") at
>the mouseLoc
>
>is modal on MacOS (i.e. it waits until you pick something from the menu
>before it goes to the next script line), but on Windows, it's not (it
>pops up the menu and immediately goes to the next script line).
>
>So to get around it, I have added right after it:
>
>  if the platform is "Win32" then
>wait until the mouse is up with messages
>  end if
>
>This causes the script to pause, but allows other things to happen
>(pendingMessages get sent, etc.).
>
>HTH,
>
>Ken Ray


___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


RE: wait with messages...

2004-02-01 Thread Ken Ray
> Thanks for the explanation.
> How would you use:
> 
> wait for messages
> and
> wait with messages
> 
> ??
> 
> Would it be something like:
> 
> wait for 4 seconds with messages

Right, allowing processing to continue while it waits.

> wait for messages
>
> (pauses handler until *any* message is received? and why 
> would I ever use
> this?)

I don't know... this one seems a little goofy, but I'm sure there was a
reason to have it developed. :-)

Another one I like is this one:

  global gStatus

  wait until gStatus is "go" with messages

This allows you to stop at a line and wait until a global has been set
to a particular value while other things are going on.


GIH (glad it helps)

Ken


___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


RE: wait with messages...

2004-01-31 Thread Chipp Walters
Ken,

Thanks for the explanation.
How would you use:

wait for messages
and
wait with messages

??

Would it be something like:

wait for 4 seconds with messages
?or:

wait for messages
(pauses handler until *any* message is received? and why would I ever use
this?)

I have a feeling there's some great power here, I just want to understand
how to use it!

YIH (yep it helps)

Chipp

> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Ken Ray
> Sent: Saturday, January 31, 2004 11:34 PM
> To: 'How to use Revolution'
> Subject: RE: wait with messages...
>
>
> Chipp,
>
> I usually use the form:
>
>   wait until  with messages
>
> which allows for normal idle-time message processing while Rev waits.
> For example, one thing that has been bugged in Bugzilla is that opening
> up a popup menu remotely:
>
>   popup (long id of btn "ContextPop" of card 1 of stack "MyStack") at
> the mouseLoc
>
> is modal on MacOS (i.e. it waits until you pick something from the menu
> before it goes to the next script line), but on Windows, it's not (it
> pops up the menu and immediately goes to the next script line).
>
> So to get around it, I have added right after it:
>
>   if the platform is "Win32" then
> wait until the mouse is up with messages
>   end if
>
> This causes the script to pause, but allows other things to happen
> (pendingMessages get sent, etc.).
>
> HTH,
>
> Ken Ray
> Sons of Thunder Software
> Email: [EMAIL PROTECTED]
> Web Site: http://www.sonsothunder.com/
>
> > -Original Message-
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On Behalf Of
> > Chipp Walters
> > Sent: Saturday, January 31, 2004 1:58 AM
> > To: How to use Revolution
> > Subject: wait with messages...
> >
> >
> > Scott, (and anyone else who)
> >
> > I use send "fred" to this cd in 30 milliseconds all the time, but I'm
> > really not sure what
> >
> > wait with messages
> > and
> > wait for messages
> >
> > do
> >
> > The docs don't explain it very clearly...at least not to me:-(
> >
> > Does it:
> >
> > wait until any message whatsoever fires and then continue?
> >
> >   Which means the RR IDE would fire it as it's sending
> > messages all over
> > the place.
> >
> > Can you provide an example where you would use one and not
> > the other or
> > not 'send'?
> >
> > tia,
> > Chipp
> >
> > ___
> > use-revolution mailing list
> > [EMAIL PROTECTED]
> > http://lists.runrev.com/mailman/listinfo/use-> revolution
> >
>
>
> ___
> use-revolution mailing list
> [EMAIL PROTECTED]
> http://lists.runrev.com/mailman/listinfo/use-revolution
>


___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


RE: wait with messages...

2004-01-31 Thread Ken Ray
Chipp,

I usually use the form:

  wait until  with messages

which allows for normal idle-time message processing while Rev waits.
For example, one thing that has been bugged in Bugzilla is that opening
up a popup menu remotely:

  popup (long id of btn "ContextPop" of card 1 of stack "MyStack") at
the mouseLoc

is modal on MacOS (i.e. it waits until you pick something from the menu
before it goes to the next script line), but on Windows, it's not (it
pops up the menu and immediately goes to the next script line).

So to get around it, I have added right after it:

  if the platform is "Win32" then
wait until the mouse is up with messages
  end if

This causes the script to pause, but allows other things to happen
(pendingMessages get sent, etc.).

HTH,

Ken Ray
Sons of Thunder Software
Email: [EMAIL PROTECTED]
Web Site: http://www.sonsothunder.com/ 

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> Chipp Walters
> Sent: Saturday, January 31, 2004 1:58 AM
> To: How to use Revolution
> Subject: wait with messages...
> 
> 
> Scott, (and anyone else who)
> 
> I use send "fred" to this cd in 30 milliseconds all the time, but I'm 
> really not sure what
> 
> wait with messages
> and
> wait for messages
> 
> do
> 
> The docs don't explain it very clearly...at least not to me:-(
> 
> Does it:
> 
> wait until any message whatsoever fires and then continue?
> 
>   Which means the RR IDE would fire it as it's sending 
> messages all over 
> the place.
> 
> Can you provide an example where you would use one and not 
> the other or 
> not 'send'?
> 
> tia,
> Chipp
> 
> ___
> use-revolution mailing list
> [EMAIL PROTECTED] 
> http://lists.runrev.com/mailman/listinfo/use-> revolution
> 


___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


wait with messages...

2004-01-31 Thread Chipp Walters
Scott, (and anyone else who)

I use send "fred" to this cd in 30 milliseconds all the time, but I'm 
really not sure what

wait with messages
and
wait for messages
do

The docs don't explain it very clearly...at least not to me:-(

Does it:

wait until any message whatsoever fires and then continue?

 Which means the RR IDE would fire it as it's sending messages all over 
the place.

Can you provide an example where you would use one and not the other or 
not 'send'?

tia,
Chipp
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution