Finding orphaned "put"

Peter Haworth pete at lcsql.com
Sat May 4 17:22:10 EDT 2013


Hi WIlliam,
You should be able to find your orphaned puts using a regular expression in
the Find box

In the script editor window, type command-F then click the More button and
the the expand arrow for iptions, then check the regular expression box.
 In the Find What box type:

^\s+put\s.((?!(into|after)).)*$

then click find all after setting the option menu to stack or whatever
scope you need for the find.  That should find any lines that start with
any number of spaces, then "put" and do not have the words "into" or
"after" in the same line.  This works in my regular expression test program
but haven't tried it in LC

Hope that helps

Pete
lcSQL Software <http://www.lcsql.com>
PS I've been caught by this in the past and now have a "putmsg" handler
that I call when I want to put something in the message box.  Same for
answer dialogs I use for debugging purposes. Much easier to find those and
get rid of them.



On Sat, May 4, 2013 at 1:05 PM, william humphrey <bill at bluewatermaritime.com
> wrote:

> I remember reading somewhere that version 6.0 or maybe GLX2 script editor
> has a way to find an orphaned "put".  Anybody have any suggestions? If I
> search for every "put" in my 6500 lines of code it will take a while and my
> eyes will go blurry reading each one to check if it is putting to the
> message box or not. Maybe there would be a way to "turn off" having a PUT
> go right to the message box unless you say "put variable in the message
> box"?
> _______________________________________________
> 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