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

Reply via email to