Stray Puts
Dar Scott
dsc at swcp.com
Fri Feb 24 16:55:03 EST 2012
Is there any advantage of using a debug constant over commenting out the body of the log?
And, to add to the confusion of output possibilities, if I want to minimize the time impact or have other constraints, I log to a variable and then do something with the variable.
Dar
On Feb 24, 2012, at 2:41 PM, Andre Garzia wrote:
> Jacque,
>
> I use something like
>
> constant kDebug = true
>
> on log pText
> if kDebug is true then
> put pText
> end if
> end log
>
> The good thing is that if I want to change from debug to release, I just
> change the kDebug constant value and the puts are gone.
>
> Cheers
> andre
>
>
> On Fri, Feb 24, 2012 at 6:58 PM, J. Landman Gay <jacque at hyperactivesw.com>wrote:
>
>> On 2/24/12 1:55 PM, Dar Scott wrote:
>>
>> I suspect we are all doing this the wrong way. Maybe there are
>>> debugging features or compiler optimizations that allow for better
>>> ways to do this.
>>>
>>
>> I've started doing it the way someone else suggested. I use a handler:
>>
>> on log pMsg
>> put pMsg
>> end log
>>
>> Then in the scripts:
>>
>> LOG "Message about script performance."
>>
>> When I want to stop logging, I just comment out the one-line body of the
>> handler. If I really want to remove it all, I search for "LOG " (with
>> space.)
>>
>> I don't know of any native LiveCode way to do it.
>>
>> --
>> Jacqueline Landman Gay | jacque at hyperactivesw.com
>> HyperActive Software | http://www.hyperactivesw.com
>>
>>
>> ______________________________**_________________
>> 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<http://lists.runrev.com/mailman/listinfo/use-livecode>
>>
>
>
>
> --
> http://www.andregarzia.com -- All We Do Is Code.
> http://fon.nu -- minimalist url shortening service.
> _______________________________________________
> 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
---------------------------
Dar Scott
dba
Dar Scott Consulting
8637 Horacio Place NE
Albuquerque, NM 87111
Lab, home, office phone: +1 505 299 9497
For Skype and fax, please contact.
dsc at swcp.com
Computer Programming and tinkering,
often making LiveCode libraries and
externals, sometimes writing associated
microcontroller firmware.
---------------------------
More information about the use-livecode
mailing list