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
(permanent link to this info here:
http://revcoders.org/qwe/)_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution