Pending messages
So . . . here I am with a stack containing 2 buttons: 'B' and 'cancel', and a field 'KNT': Btn 'B' contains the script: on mouseUp put 1 into KK repeat until KK = 25 set the vis of btn B to false wait 20 ticks with messages set the vis of btn B to true wait 20 ticks with messages put KK into fld KNT add 1 to KK end repeat end mouseUp I want to stop the action started by btn B using a script in btn cancel but cannot work out how to do that. Richmond. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Pending messages
Using Mark's example, another possible option is make the custom property a condition for the repeat; repeat until KK = 25 or the cClicked of btn Cancel is true set the vis of btn B to false wait 20 ticks with messages set the vis of btn B to true wait 20 ticks with messages put KK into fld KNT add 1 to KK end repeat On 14/07/2014 10:01, Mark Schonewille wrote: repeat until KK = 25 if the cClicked of btn Cancel is true then exit repeat set the vis of btn B to false wait 20 ticks with messages if the cClicked of btn Cancel is true then exit repeat set the vis of btn B to true wait 20 ticks with messages if the cClicked of btn Cancel is true then exit repeat put KK into fld KNT add 1 to KK end repeat ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Pending messages
Yes, I thought of that, John, but if you do that, the script may run for another 20 ticks after the Cancel button has been clicked on. -- Best regards, Mark Schonewille Economy-x-Talk Consulting and Software Engineering Homepage: http://economy-x-talk.com Twitter: http://twitter.com/xtalkprogrammer KvK: 50277553 Installer Maker for LiveCode: http://qery.us/468 Buy my new book Programming LiveCode for the Real Beginner http://qery.us/3fi LiveCode on Facebook: https://www.facebook.com/groups/runrev/ On 7/14/2014 11:34, John Craig wrote: Using Mark's example, another possible option is make the custom property a condition for the repeat; repeat until KK = 25 or the cClicked of btn Cancel is true set the vis of btn B to false wait 20 ticks with messages set the vis of btn B to true wait 20 ticks with messages put KK into fld KNT add 1 to KK end repeat ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Pending messages
Just an option. Looking at Richmond's example, it may be desirable to always finish with the button visible and the KNT field updated - ony Richmond knows for sure! :D On 14/07/2014 10:43, Mark Schonewille wrote: Yes, I thought of that, John, but if you do that, the script may run for another 20 ticks after the Cancel button has been clicked on. -- Best regards, Mark Schonewille Economy-x-Talk Consulting and Software Engineering Homepage: http://economy-x-talk.com Twitter: http://twitter.com/xtalkprogrammer KvK: 50277553 Installer Maker for LiveCode: http://qery.us/468 Buy my new book Programming LiveCode for the Real Beginner http://qery.us/3fi LiveCode on Facebook: https://www.facebook.com/groups/runrev/ On 7/14/2014 11:34, John Craig wrote: Using Mark's example, another possible option is make the custom property a condition for the repeat; repeat until KK = 25 or the cClicked of btn Cancel is true set the vis of btn B to false wait 20 ticks with messages set the vis of btn B to true wait 20 ticks with messages put KK into fld KNT add 1 to KK end repeat ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Pending messages
On 07/14/2014 12:52 PM, John Craig wrote: Just an option. Looking at Richmond's example, it may be desirable to always finish with the button visible and the KNT field updated - ony Richmond knows for sure! :D Yes, of course. The button has to be visible. Richmond. On 14/07/2014 10:43, Mark Schonewille wrote: Yes, I thought of that, John, but if you do that, the script may run for another 20 ticks after the Cancel button has been clicked on. -- Best regards, Mark Schonewille Economy-x-Talk Consulting and Software Engineering Homepage: http://economy-x-talk.com Twitter: http://twitter.com/xtalkprogrammer KvK: 50277553 Installer Maker for LiveCode: http://qery.us/468 Buy my new book Programming LiveCode for the Real Beginner http://qery.us/3fi LiveCode on Facebook: https://www.facebook.com/groups/runrev/ On 7/14/2014 11:34, John Craig wrote: Using Mark's example, another possible option is make the custom property a condition for the repeat; repeat until KK = 25 or the cClicked of btn Cancel is true set the vis of btn B to false wait 20 ticks with messages set the vis of btn B to true wait 20 ticks with messages put KK into fld KNT add 1 to KK end repeat ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Animation Engine: removing pending messages
I'd like to clear all animation engine messages. I've an animation that I want to stop, and when I stop it I delete a bunch of objects - however when they are fading, or otherwise animating AE complains that the controls no longer exist. Any solutions? ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: AnimationEngine pending messages
Hey Tom, Should be adding an aeCancelAllAEMessages command? Sounds like something that could be useful… Cheers, Malte -- derbrill IT-service Malte Pfaff-Brill Tanneneck 2, d-24790 Ostenfeld Tel: +49 4331-337 640 0 eMail: i...@derbrill.de web: http://www.derbrill.de Steuernummer: 28 015 03865 VAT ID: DE223571286 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: AnimationEngine pending messages
Malte, All I can say is that when I was working on this project it seemed to be a natural thing to look for. Every time I would go to a new card the same scripts would run and animate image 1 but If I went to the next card before the current card animation was done it would then build up on top of the new cards animation of image 1. So when I specifically targeted the name of image 1 (which was different on each card) then it no longer built up. In this case it would have been a no brainer that when I wanted to skip quickly through the cards that I could clear the messages from the previous cards animation sequence. Thanks Tom -- Tom McGrath III http://lazyriver.on-rev.com mcgra...@mac.com On May 26, 2013, at 7:38 AM, Malte Brill revolut...@derbrill.de wrote: Hey Tom, Should be adding an aeCancelAllAEMessages command? Sounds like something that could be useful… Cheers, Malte -- derbrill IT-service Malte Pfaff-Brill Tanneneck 2, d-24790 Ostenfeld Tel: +49 4331-337 640 0 eMail: i...@derbrill.de web: http://www.derbrill.de Steuernummer: 28 015 03865 VAT ID: DE223571286 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
AnimationEngine pending messages
I am having trouble canceling the pending messages that are built up with use of AE in my mobile app. I have a series of AE commands on card open but want to stop them all when moving to a new card. Even in the IDE with the pending messages/message box open I can only delete one line of the pending messages and then a new message keeps coming after a bit. Is there a way to absolutely stop ALL of them that I am missing? I am trying this in my openCard handler but they still seem to stack up. put the pendingmessages into tPendingMsgs repeat for each line x in tPendingMsgs cancel item 1 of x end repeat Thanks Tom -- Tom McGrath III http://lazyriver.on-rev.com mcgra...@mac.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: AnimationEngine pending messages
I'd give it a try with the code as in the docs (under cancel) repeat until the pendingMessages is empty cancel item 1 of line 1 of the pendingMessages end repeat It might just be that you catch additional timed messages that have triggered while you are inside your loop. What the heck - do that code twice :-) -- delete all outstanding messages repeat until the pendingMessages is empty cancel item 1 of line 1 of the pendingMessages end repeat -- and do it again just for luck repeat until the pendingMessages is empty cancel item 1 of line 1 of the pendingMessages end repeat -- Alex. On 24/05/2013 16:34, Thomas McGrath III wrote: I am having trouble canceling the pending messages that are built up with use of AE in my mobile app. I have a series of AE commands on card open but want to stop them all when moving to a new card. Even in the IDE with the pending messages/message box open I can only delete one line of the pending messages and then a new message keeps coming after a bit. Is there a way to absolutely stop ALL of them that I am missing? I am trying this in my openCard handler but they still seem to stack up. put the pendingmessages into tPendingMsgs repeat for each line x in tPendingMsgs cancel item 1 of x end repeat Thanks Tom -- Tom McGrath III http://lazyriver.on-rev.com mcgra...@mac.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: AnimationEngine pending messages
May not make a difference, but have you already tried: repeat for each line x in the pendingMessages I'm asking only because I haven't seen message canceling done by putting the messages in a variable first. Regards, Scott Rossi Creative Director Tactile Media, UX Design On May 24, 2013, at 8:34 AM, Thomas McGrath III mcgra...@mac.com wrote: I am having trouble canceling the pending messages that are built up with use of AE in my mobile app. I have a series of AE commands on card open but want to stop them all when moving to a new card. Even in the IDE with the pending messages/message box open I can only delete one line of the pending messages and then a new message keeps coming after a bit. Is there a way to absolutely stop ALL of them that I am missing? I am trying this in my openCard handler but they still seem to stack up. put the pendingmessages into tPendingMsgs repeat for each line x in tPendingMsgs cancel item 1 of x end repeat Thanks Tom -- Tom McGrath III http://lazyriver.on-rev.com mcgra...@mac.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
RE: AnimationEngine pending messages
Scott... like on cancelThisMsg tMsg put the pendingmessages into tPendingMsgs IF tMsg is in tPendingMsgs then repeat for each line x in tPendingMsgs if tMsg is in x then cancel item 1 of x end repeat end if end cancelThisMsg from the notes in the dictionary..:-) Subject: Re: AnimationEngine pending messages From: sc...@tactilemedia.com Date: Fri, 24 May 2013 10:05:49 -0700 To: use-livecode@lists.runrev.com May not make a difference, but have you already tried: repeat for each line x in the pendingMessages I'm asking only because I haven't seen message canceling done by putting the messages in a variable first. Regards, Scott Rossi Creative Director Tactile Media, UX Design On May 24, 2013, at 8:34 AM, Thomas McGrath III mcgra...@mac.com wrote: I am having trouble canceling the pending messages that are built up with use of AE in my mobile app. I have a series of AE commands on card open but want to stop them all when moving to a new card. Even in the IDE with the pending messages/message box open I can only delete one line of the pending messages and then a new message keeps coming after a bit. Is there a way to absolutely stop ALL of them that I am missing? I am trying this in my openCard handler but they still seem to stack up. put the pendingmessages into tPendingMsgs repeat for each line x in tPendingMsgs cancel item 1 of x end repeat Thanks Tom -- Tom McGrath III http://lazyriver.on-rev.com mcgra...@mac.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: AnimationEngine pending messages
Just because it's in the dictionary doesn't mean I've seen it :-) Regards, Scott Rossi Creative Director Tactile Media, UX Design On May 24, 2013, at 10:10 AM, John Dixon dixo...@hotmail.co.uk wrote: Scott... like on cancelThisMsg tMsg put the pendingmessages into tPendingMsgs IF tMsg is in tPendingMsgs then repeat for each line x in tPendingMsgs if tMsg is in x then cancel item 1 of x end repeat end if end cancelThisMsg from the notes in the dictionary..:-) Subject: Re: AnimationEngine pending messages From: sc...@tactilemedia.com Date: Fri, 24 May 2013 10:05:49 -0700 To: use-livecode@lists.runrev.com May not make a difference, but have you already tried: repeat for each line x in the pendingMessages I'm asking only because I haven't seen message canceling done by putting the messages in a variable first. Regards, Scott Rossi Creative Director Tactile Media, UX Design On May 24, 2013, at 8:34 AM, Thomas McGrath III mcgra...@mac.com wrote: I am having trouble canceling the pending messages that are built up with use of AE in my mobile app. I have a series of AE commands on card open but want to stop them all when moving to a new card. Even in the IDE with the pending messages/message box open I can only delete one line of the pending messages and then a new message keeps coming after a bit. Is there a way to absolutely stop ALL of them that I am missing? I am trying this in my openCard handler but they still seem to stack up. put the pendingmessages into tPendingMsgs repeat for each line x in tPendingMsgs cancel item 1 of x end repeat Thanks Tom -- Tom McGrath III http://lazyriver.on-rev.com mcgra...@mac.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: AnimationEngine pending messages
Actually, I did see the note in the dictionary and tried that. But I think since I was using AE to generate effects using image 1 that each card was somehow newly stacking commands for image 1 of each card. When I changed it to the name of image 1 then they no longer stacked for each card. Weird. So in the end I avoided having to cancel the pending messages. Still don't know exactly what was happening and how but I'm good now. Thanks -- Tom McGrath III http://lazyriver.on-rev.com mcgra...@mac.com On May 24, 2013, at 1:27 PM, Scott Rossi sc...@tactilemedia.com wrote: Just because it's in the dictionary doesn't mean I've seen it :-) Regards, Scott Rossi Creative Director Tactile Media, UX Design On May 24, 2013, at 10:10 AM, John Dixon dixo...@hotmail.co.uk wrote: Scott... like on cancelThisMsg tMsg put the pendingmessages into tPendingMsgs IF tMsg is in tPendingMsgs then repeat for each line x in tPendingMsgs if tMsg is in x then cancel item 1 of x end repeat end if end cancelThisMsg from the notes in the dictionary..:-) Subject: Re: AnimationEngine pending messages From: sc...@tactilemedia.com Date: Fri, 24 May 2013 10:05:49 -0700 To: use-livecode@lists.runrev.com May not make a difference, but have you already tried: repeat for each line x in the pendingMessages I'm asking only because I haven't seen message canceling done by putting the messages in a variable first. Regards, Scott Rossi Creative Director Tactile Media, UX Design On May 24, 2013, at 8:34 AM, Thomas McGrath III mcgra...@mac.com wrote: I am having trouble canceling the pending messages that are built up with use of AE in my mobile app. I have a series of AE commands on card open but want to stop them all when moving to a new card. Even in the IDE with the pending messages/message box open I can only delete one line of the pending messages and then a new message keeps coming after a bit. Is there a way to absolutely stop ALL of them that I am missing? I am trying this in my openCard handler but they still seem to stack up. put the pendingmessages into tPendingMsgs repeat for each line x in tPendingMsgs cancel item 1 of x end repeat Thanks Tom -- Tom McGrath III http://lazyriver.on-rev.com mcgra...@mac.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Detecting pending messages
When in a handler for a standard LC message (specifically keyDown), is it possible to check if there are any other keyDown messages in the message queue? I see the pendingMessages property but the dictionary says it only lists messages scheduled with the Send command. Pete lcSQL Software http://www.lcsql.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Detecting pending messages
Yes, it only will show you developer initiated messages. Not much use to you for your purposes. I imagine being able to intercept and view the many engine messages that are flying around would severely limit the performance of the engine. Also, I imagine simply requesting a list of pending engine messages would ITSELF generate a slew of new messages. :-) Bob On Dec 23, 2012, at 10:01 AM, Peter Haworth wrote: When in a handler for a standard LC message (specifically keyDown), is it possible to check if there are any other keyDown messages in the message queue? I see the pendingMessages property but the dictionary says it only lists messages scheduled with the Send command. Pete lcSQL Software http://www.lcsql.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Detecting pending messages
Hi Mike, I have that, never thought of looking in there. Thanks. Pete lcSQL Software http://www.lcsql.com On Sun, Dec 23, 2012 at 10:56 AM, Mike Bonner bonnm...@gmail.com wrote: You should take a look at 4w's flight recorder (its in the revnet user stuff) Works really well and you can grok the code and roll your own custom message watcher. On Sun, Dec 23, 2012 at 11:41 AM, Robert Sneidar slylab...@me.com wrote: Yes, it only will show you developer initiated messages. Not much use to you for your purposes. I imagine being able to intercept and view the many engine messages that are flying around would severely limit the performance of the engine. Also, I imagine simply requesting a list of pending engine messages would ITSELF generate a slew of new messages. :-) Bob On Dec 23, 2012, at 10:01 AM, Peter Haworth wrote: When in a handler for a standard LC message (specifically keyDown), is it possible to check if there are any other keyDown messages in the message queue? I see the pendingMessages property but the dictionary says it only lists messages scheduled with the Send command. Pete lcSQL Software http://www.lcsql.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Detecting pending messages
So it seems that flight recorder uses the undocumented messageHandled message. Browsing through the list, it seems that this can cause significant performance issues. I'd say it's OK to use for debugging purposes but not for normal usage. Oh well, I guess I'll have to come up with another way to do this. Pete lcSQL Software http://www.lcsql.com On Sun, Dec 23, 2012 at 10:56 AM, Mike Bonner bonnm...@gmail.com wrote: You should take a look at 4w's flight recorder (its in the revnet user stuff) Works really well and you can grok the code and roll your own custom message watcher. On Sun, Dec 23, 2012 at 11:41 AM, Robert Sneidar slylab...@me.com wrote: Yes, it only will show you developer initiated messages. Not much use to you for your purposes. I imagine being able to intercept and view the many engine messages that are flying around would severely limit the performance of the engine. Also, I imagine simply requesting a list of pending engine messages would ITSELF generate a slew of new messages. :-) Bob On Dec 23, 2012, at 10:01 AM, Peter Haworth wrote: When in a handler for a standard LC message (specifically keyDown), is it possible to check if there are any other keyDown messages in the message queue? I see the pendingMessages property but the dictionary says it only lists messages scheduled with the Send command. Pete lcSQL Software http://www.lcsql.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Pending Messages
Hi Michael, On 2/14/12 2:09 PM, Michael Doub wrote: I am looking for some advise before start trying to figure out how throw away messages . I am currently catching touch movement events and rendering a graph within a slider. Clearly the rendering is slowing things a bit and I am experiencing some sluggishness. I am thinking about trying to look at the pending messages from within the touch move handler and only processing the last move message. One way to do that: local sDoitID -- ID of a pending message on touchMove tID, x, y cancel sDoitID -- works OK if no ID exists too send doit x,y to me in 1 tick put the result into sDoitID end touchMove This way there is only one pending message at any time - and it's the last one sent. Maybe that will improve responsiveness. Best - Phil Davis Initially I was thinking of replacing the doit command below with a send after 0 ticks command but it seems to me this would only work if the TouchMove message is a higher priority than the doit message. For that matter checking in the touch move handler assumes that the engine is adding touch messages to the pending message list at a higher priority that the TouchMove handler itself. I don't think there is any notion of priority in the message path, so I am not sure if I am thinking about this problem correctly. Can anyone provide me with a bit of advice on this topic. Thanks Mike today: On TouchMove tID, x, y doit x, y end TouchMove On doit -- render here End doit Option 1: On TouchMove tID,x,y look at pending messages capture the x y of the last message cancel all of the touch move messages doit x,y End TouchMove Option 2: On TouchMove tID, x, y send (doit x comma y) to me in 0 ticks end TouchMove On doit look at pending messages capture the x y of the last doit message cancel all of the doit messages -- render here using last x y End doit ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode -- Phil Davis PDS Labs Professional Software Development http://pdslabs.net ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Pending Messages
On Feb 14, 2012, at 4:09 PM, Michael Doub wrote: I am currently catching touch movement events and rendering a graph within a slider. Clearly the rendering is slowing things a bit and I am experiencing some sluggishness. Are you locking the screen before you change the graph and then unlocking it when you're done? Also, the objects that are being changed by dragging the slider seem like candidates for setting the layerMode of those objects to dynamic. Also, touchMove messages aren't sent as often as mouseMove, so you may way to try using mouseMove instead of touchMove (don't use them both or you'll get both!) and see if that helps. Ken Ray Sons of Thunder Software, Inc. Email: k...@sonsothunder.com Web Site: http://www.sonsothunder.com/ ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Pending Messages
Ken and Phil: Thank you both for your input. Phil your sample scrip helped a lot. Ken, yes, I am locking the screen before the updating the chart. I don't know anything about the layer mode so I guess I need to learn more about that. I have always been a bit confused about when and when not to use the touch handlers as opposed to the mouse. Is it safe to say that you should stick with the mouse handlers unless you are interested in detecting multiple touch events? And I am in fact using them both so I need to fix that. Any idea why the frequency difference between the touch and mouse? I would have expected them to be the same. Thanks again, Mike On 02/15/2012, at 10:43 AM, Ken Ray wrote: On Feb 14, 2012, at 4:09 PM, Michael Doub wrote: I am currently catching touch movement events and rendering a graph within a slider. Clearly the rendering is slowing things a bit and I am experiencing some sluggishness. Are you locking the screen before you change the graph and then unlocking it when you're done? Also, the objects that are being changed by dragging the slider seem like candidates for setting the layerMode of those objects to dynamic. Also, touchMove messages aren't sent as often as mouseMove, so you may way to try using mouseMove instead of touchMove (don't use them both or you'll get both!) and see if that helps. Ken Ray Sons of Thunder Software, Inc. Email: k...@sonsothunder.com Web Site: http://www.sonsothunder.com/ ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Pending Messages
Ken, when using the Dynamic Layer mode am I correct to assume that all of the objects including groups need to have the property mode set to dynamic. In my case I am not really moving the objects but instead changing their color. Movement is possible but not expected to be a common occurrence. -= Mike On 02/15/2012, at 11:37 AM, Michael Doub wrote: Ken and Phil: Thank you both for your input. Phil your sample scrip helped a lot. Ken, yes, I am locking the screen before the updating the chart. I don't know anything about the layer mode so I guess I need to learn more about that. I have always been a bit confused about when and when not to use the touch handlers as opposed to the mouse. Is it safe to say that you should stick with the mouse handlers unless you are interested in detecting multiple touch events? And I am in fact using them both so I need to fix that. Any idea why the frequency difference between the touch and mouse? I would have expected them to be the same. Thanks again, Mike On 02/15/2012, at 10:43 AM, Ken Ray wrote: On Feb 14, 2012, at 4:09 PM, Michael Doub wrote: I am currently catching touch movement events and rendering a graph within a slider. Clearly the rendering is slowing things a bit and I am experiencing some sluggishness. Are you locking the screen before you change the graph and then unlocking it when you're done? Also, the objects that are being changed by dragging the slider seem like candidates for setting the layerMode of those objects to dynamic. Also, touchMove messages aren't sent as often as mouseMove, so you may way to try using mouseMove instead of touchMove (don't use them both or you'll get both!) and see if that helps. Ken Ray Sons of Thunder Software, Inc. Email: k...@sonsothunder.com Web Site: http://www.sonsothunder.com/ ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Pending Messages
Ken, yes, I am locking the screen before the updating the chart. I don't know anything about the layer mode so I guess I need to learn more about that. Ken, when using the Dynamic Layer mode am I correct to assume that all of the objects including groups need to have the property mode set to dynamic. In my case I am not really moving the objects but instead changing their color. Movement is possible but not expected to be a common occurrence. If you're not moving them, then you shouldn't need to use dynamic layering. I have always been a bit confused about when and when not to use the touch handlers as opposed to the mouse. Is it safe to say that you should stick with the mouse handlers unless you are interested in detecting multiple touch events? And I am in fact using them both so I need to fix that. Any idea why the frequency difference between the touch and mouse? I would have expected them to be the same. I don't know why the frequency is different, but in general, my rule of thumb is this: - If you don't care about multi-touch, use mouse events for everything but mouseMove/touchMove. - Pick either touchMove or mouseMove and if you have any problems with it, try using the other. I haven't exactly identified when the best time to use one or the other is, with the exception of a project I was working on where I was needing to drag something and update a field with the location of the dragged object - when I did it with touchMove it was a little less responsive than with mouseMove. HTH, Ken Ray Sons of Thunder Software, Inc. Email: k...@sonsothunder.com Web Site: http://www.sonsothunder.com/ ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Pending Messages
I am looking for some advise before start trying to figure out how throw away messages . I am currently catching touch movement events and rendering a graph within a slider. Clearly the rendering is slowing things a bit and I am experiencing some sluggishness. I am thinking about trying to look at the pending messages from within the touch move handler and only processing the last move message. Initially I was thinking of replacing the doit command below with a send after 0 ticks command but it seems to me this would only work if the TouchMove message is a higher priority than the doit message. For that matter checking in the touch move handler assumes that the engine is adding touch messages to the pending message list at a higher priority that the TouchMove handler itself. I don't think there is any notion of priority in the message path, so I am not sure if I am thinking about this problem correctly. Can anyone provide me with a bit of advice on this topic. Thanks Mike today: On TouchMove tID, x, y doit x, y end TouchMove On doit -- render here End doit Option 1: On TouchMove tID,x,y look at pending messages capture the x y of the last message cancel all of the touch move messages doit x,y End TouchMove Option 2: On TouchMove tID, x, y send (doit x comma y) to me in 0 ticks end TouchMove On doit look at pending messages capture the x y of the last doit message cancel all of the doit messages -- render here using last x y End doit ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode