dead handler detector?

Alex Tweedly alex at tweedly.net
Sat Dec 31 11:23:01 EST 2011


In some circumstances, it's not "more complex", it's "impossible".
For example, something like

--  don't do this for real :-)
repeat forever
   ask "What should I do next?"
   if it = "quit" then exit repeat
   put it into tNextHandler
   do "tNextHandler"
next repeat

However, there are cases less egregious than this which can hide the 
handler name pretty thoroughly, so  you need to decide just *how* far 
dead a handler needs to be in order to remove it :-)

-- Alex.

On 31/12/2011 01:19, Pete wrote:
> Hi Phil,
> I assume you're trying to find handlers that are not referenced by any
> other handlers?  I started on a stack a while back to do the reverse of
> that - cross reference where handlers are called from but it would show you
> which ones are not called from anywhere.
>
> I'll have to search round for it because I kinda left it alone in favor of
> doing other things but let me know if this is what you're looking for and
> I'll see if I can find it and see what state it's in.
>
> Pete
>
> On Fri, Dec 30, 2011 at 12:29 PM, Phil Davis<revdev at pdslabs.net>  wrote:
>
>> Hi folks -
>>
>> Does anyone have a dead handler detector they would like to share? I
>> looked in RevOnline but didn't find anything.
>>
>> It seems I'm always working on old code that contains handlers that have
>> been superseded by other handlers. I would like an easy way to find those
>> now-unused handlers and remove them.
>>
>> I realize the task of detecting dead handlers is conceptually simple but
>> more complex when it comes to implementation. Still, maybe you have built
>> such a thing that you wouldn't mind sharing.
>>
>> Happy New Year! (Is it too early to say that?)
>> --
>> Phil Davis
>>
>> PDS Labs
>> Professional Software Development
>> http://pdslabs.net
>>
>>
>> ______________________________**_________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/**mailman/listinfo/use-livecode<http://lists.runrev.com/mailman/listinfo/use-livecode>
>>
>>
>





More information about the use-livecode mailing list