Identifying Un-used functions and commands

dunbarx at aol.com dunbarx at aol.com
Mon Nov 25 12:47:20 EST 2019


Hi.
This was posted a couple of weeks ago, no?
I suggested then that you could write a short handler that loops through all the scripts in all the controls on all the cards, and isolate words that are not preceded by either "command", "on" or "function". In this way you might see, for example, that "myGadget3" may be present in scripts here and there, but there is no "on myGadget3" anywhere. Then you will have found an unused handler call.
This may require tweaking. For example, LC will compile, say:
"on         myGadget3"  -- spaces galore

Craig

-----Original Message-----
From: Bob Sneidar via use-livecode <use-livecode at lists.runrev.com>
To: How to use LiveCode <use-livecode at lists.runrev.com>
Cc: Bob Sneidar <bobsneidar at iotecdigital.com>
Sent: Mon, Nov 25, 2019 12:29 pm
Subject: Re: Identifying Un-used functions and commands

Since there is code in the script editor that knows the location of any command or function you right click on, if you found out how they do that, you would be well on your way to developing a way to grok it. Also, GLX2 has a "clairvoyance" (Auto-Complete) function that is handler aware. I suspect Mark Wieder developed a method for getting a list of all handlers in a stack that is opened. That would probably help too. 

Bob S


> On Nov 12, 2019, at 09:12 , Stephen MacLean via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> Hi All,
> 
> I’m wondering if anyone has a way or code to identify any un-used functions and commands in a set of stacks?
> 
> Best,
> Steve MacLean
> 
> _______________________________________________
> 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

_______________________________________________
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



More information about the use-livecode mailing list