Re: Wait with messages
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
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
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
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
Re: wait with messages revisited.
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.
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.
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
Re: wait with messages
--- 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
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
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
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
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
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
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
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
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
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
Re: wait with messages...
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: wait with messages...
--- 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...
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...
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...
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...
> 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...
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...
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