I have a stack where all sorts of messages are being sent, and I wish to top everything 'dead', so I decided to use flushEvents,
now, naturally I should send flushEvents("keyUp") as it is inwith a keyUp statement I need to stop everything dead, BUT . . .
. . . I need to send 2 further commands inwith the keyUp command after the events have been flushed.
Flushing down the pan
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Livecode Opensource Backer
- Posts: 10140
- Joined: Fri Feb 19, 2010 10:17 am
-
- Livecode Opensource Backer
- Posts: 10140
- Joined: Fri Feb 19, 2010 10:17 am
-
- VIP Livecode Opensource Backer
- Posts: 40
- Joined: Tue Jun 27, 2006 8:35 pm
- Contact:
Re: Flushing down the pan
I see that you are using "send". If you are using "send in time" anywhere then you might want to cancel "pendingMessages" as well.
Elementary Software
...now with 20% less chalk dust!
...now with 20% less chalk dust!
Re: Flushing down the pan
You may find these handlers helpful:richmond62 wrote: ↑Sun Aug 31, 2025 1:16 pmI have a stack where all sorts of messages are being sent, and I wish to top everything 'dead', so I decided to use flushEvents,
now, naturally I should send flushEvents("keyUp") as it is inwith a keyUp statement I need to stop everything dead, BUT . . .
. . . I need to send 2 further commands inwith the keyUp command after the events have been flushed.
# stop a specific pending pMessage
Code: Select all
on stopPendingMessage pMessage
repeat for each line tLine in the pendingMessages
if pMessage is in item 1 of tLine then
cancel item 1 of tLine
end if
end repeat
end stopPendingMessage
# stop all pending messages
Code: Select all
on stopAllPendingMessages
repeat for each line tLine in the pendingmessages
cancel item 1 of tLine
end repeat
end stopAllPendingMessages
Attribution: viewtopic.php?t=20389#p103568