qwe - better than undesignated puts?

Jim Ault JimAultWins at yahoo.com
Fri Aug 4 15:53:17 EDT 2006


On 8/4/06 12:23 PM, "Josh Mellicker" <josh at dvcreators.net> wrote:
> I never liked using the Message box to show values ("put "here¹s
> MyVar now: " & MyVar"), for a few reasons, because it was a palette
> and covered important stuff up if I made it bigger, because I like to
> look at a lot of history sometimes, because it was problematic to
> find puts in my code sometimes, etcŠ

This is why I always use
put "The answer at this point is "& MyVar into msg

Then 'into msg' becomes the search string

I believe Chipp Walters has a utility script for finding all the 'put' lines
in scripts.  Check the archive at
http://www.mail-archive.com/use-revolution@lists.runrev.com/

I agree with you TextWrangler technique, and I use BBEdit for the same
purpose, but not extensively.


Jim Ault
Las Vegas

On 8/4/06 12:23 PM, "Josh Mellicker" <josh at dvcreators.net> wrote:

> I never liked using the Message box to show values ("put "here¹s
> MyVar now: " & MyVar"), for a few reasons, because it was a palette
> and covered important stuff up if I made it bigger, because I like to
> look at a lot of history sometimes, because it was problematic to
> find puts in my code sometimes, etcŠ
> 
> So, I use my "qwe" handler:
> 
> qwe "here¹s MyVar now: " & MyVar
> 
> This handler puts the date, log info & cr into a text file which I
> keep open in TextWrangler (TextWrangler auto-updates and shows the
> latest entries)
> 
> qwe advantages over undesignated "puts":
> 
>      *  app switch over and see a full page of history
>      *  scroll back and see history from previous days if useful
>      *  search for "qwe" to find all logmaking entries in your
> scripts, (whereas searching for "put" is not helpful!)
>      *  if you want to stop all logging, just comment out three lines
> in the handler and all "qwe"s stop - can¹t do that with "puts", each
> one must be deleted or commented out
>      *  easy to type!
> 
> Eventually, qwe evolves from a development debugger aid to a logging
> facility in the app (if desired).
> 
> Here is the handler:
> 
> ON qwe tNote
>    put "file:" & $HOME & "/Library/Application Support/MyFolder/
> mlog.txt"into tFile
>    put the english date && the long english time & " - " before tNote
>    put tNote & cr after URL tFile
> END qwe
> 





More information about the use-livecode mailing list