I didn't find this method explained, but it's very useful. You can delete pending message by name, without recording message id. For example the following code cancel all pending messages named "myMex":
on cancelmessages
repeat for each line templ in the pendingmessages
if item 3 of templ is "myMex" then
put item 1 of templ into temp
cancel temp
end if
end repeat
end cancelmessages
Deleting panding message by name
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Deleting panding message by name
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
Re: Deleting panding message by name
Hi Max,
I use this:
Best
Jean-Marc
I use this:
Code: Select all
--••stop one pending pMessage
on doStopPending pMessage
repeat for each line aLine in the pendingmessages
if pMessage is in item 1 of aLine then
cancel item 1 of aLine
end if
end repeat
end doStopPending
--••stop all pending messages
on stopAllPending
repeat for each line aLine in the pendingmessages
cancel item 1 of aLine
end repeat
end stopAllPending
Jean-Marc
https://alternatic.ch