Pendingmessages
Chipp Walters
chipp at chipp.com
Fri Mar 2 19:22:18 EST 2007
Another nugget from Ken Ray's war chest involves canceling a pending
message. I find this helpful as a first statement after receiving and
starting to executecthe message. IOW, make sure and kill all pending
same messages so there's no 'backlog' which can create quite a
confusion when debugging!
Thanks Ken.
on CancelPending pWhat
if pWhat = "" then put "all" into pWhat
switch pWhat
case "all"
repeat with x = (the number of lines of the pendingmessages) down to 1
cancel (item 1 of line x of the pendingMessages)
end repeat
break
default
repeat with x = (the number of lines of the pendingmessages) down to 1
if line x of the pendingMessages contains ("," & pWhat & ",") then
cancel (item 1 of line x of the pendingMessages)
end if
end repeat
break
end switch
end CancelPending
More information about the use-livecode
mailing list