stopping an on-screen timer

Alex Tweedly alex at tweedly.net
Thu Jan 19 22:12:49 EST 2006


Richard Gaskin wrote:

> Good idea -- here's a handler Peter might find handy:
>
It can be considered impolite to comment on other people's code 
offerings. It must therefore be doubly impolite to make remarks about 
what they've said in the comments in their code. But hey - why let that 
stop me :-)

> -- 
> -- fwKillPendingMessage
> -- 
> -- Cancels the message named in pMessage.
> -- If pMessage contains the word "all" then
> -- all pending messages are cancelled.

I read that comment and thought
"I wonder what else he's using pMessage for that he needed to make it a 
'contains' test ?"
I expected to see a script line like
   if pMessage contains "all" then ....

> -- 
> on fwKillPendingMessage pMessage
>   put the pendingMessages into tList
>   repeat for each line tMsg in tList
>     if (pMessage is "all") or (pMessage is among the items of tMsg) then
>       cancel (item 1 of tMsg)
>     end if
>   end repeat
> end fwKillPendingMessage

So then I felt a bit silly :-)
But I might suggest changing the comment to be more like
  
-- if pMessage is "all" then all pending messages are deleted.

Are there any implications of deleting all pendingMessages when working 
in the IDE ?

-- 
Alex Tweedly       http://www.tweedly.net



-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 267.14.20/234 - Release Date: 18/01/2006




More information about the use-livecode mailing list