Hi,
1) Can I distinguish between debug and release builds in the code?
2) I am normally using a lot logging, while e.g. in C/C++ I am using a macro for them, which I disable for release – how handle such things in Lua/Corona?
Thanks
SteN
Hi,
1) Can I distinguish between debug and release builds in the code?
2) I am normally using a lot logging, while e.g. in C/C++ I am using a macro for them, which I disable for release – how handle such things in Lua/Corona?
Thanks
SteN
1. Not that I’m aware of.
2. Something like this:
local debugMode = true -- change to false to kill the prints. local cachePrint = print print = function(...) if debugMode then cachePrint(unpack(arg)) end end
Hi,
This is surely a way, but the function call remains there… even the method is empty. But okay, if that is the way in Lua I have to accept it.
Thanks a lot
Regards,
STeN
1. Not that I’m aware of.
2. Something like this:
local debugMode = true -- change to false to kill the prints. local cachePrint = print print = function(...) if debugMode then cachePrint(unpack(arg)) end end
Hi,
This is surely a way, but the function call remains there… even the method is empty. But okay, if that is the way in Lua I have to accept it.
Thanks a lot
Regards,
STeN