Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Toggling the logging function' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Toggling the logging function
Authored by: bbumgarner on Dec 20, '04 12:14:18PM

Actually, since you have defined "DoLogTF" as a property, it is therefore, global and you don't need to modify the parameters sent to the handler at all. (That is, to the best of my knowledge -- I could be wrong.) Granted this makes this routine ON or OFF for the entire script.

The advantage of your method is that you can locally turn on and off logging. The disadvantage is if you are working on large scripts it can be just as tedious to find and change each logging statement as it is finding each display dialog statement.

Don't get me wrong, I like the idea of being able to toggle the logging on and off. AND I plan on using it in my own work. I have a Applescript Studio application in the works right now that is over 700 lines long with 20-30 different handlers. This will make debugging easier.



[ Reply to This | # ]