"Rolling Credits" - Stop them and start them again

Ken Ray kray at sonsothunder.com
Sat Mar 5 23:28:32 EST 2005


On 3/5/05 10:20 PM, "Dick Kriesel" <dick.kriesel at mail.com> wrote:

> There's a way to do that a little simpler and faster.  It's simpler because
> it has no switch. It's faster because it invokes "filter" instead of testing
> each line within a loop.
> 
> on cancelPendingMessages pMessageName
>   -- note: empty implies cancel all pending messages
>   put the pendingMessages into tPendingMessages
>   if pMessageName is not empty then
>     filter tPendingMessages with "*," & pMessageName & ",*"
>   end if
>   repeat for each line tPendingPessage in tPendingMessages
>     cancel item 1 of tPendingPessage
>   end repeat
> end cancelPendingMessages
> 
> I hope this helps, without offending Ken.

Hey, Dick, no offense at all! I love it when code gets optimized... if you
don't mind, I'll modify my CancelPending handler accordingly...

Optimize my code anytime!

:-)


Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: kray at sonsothunder.com




More information about the use-livecode mailing list