Can I change the print output on Xcode to not display the time , date, seconds, name of app and and the other bits?
Is it possible to set a scaling window or make sure the view fits the window without the empty canvas?
Can I change the print output on Xcode to not display the time , date, seconds, name of app and and the other bits?
Is it possible to set a scaling window or make sure the view fits the window without the empty canvas?
Can I change the print output on Xcode to not display the time , date, seconds, name of app and and the other bits?
You mean when you output something with NSLog()? Try using printf().
Is it possible to set a scaling window or make sure the view fits the window without the empty canvas?
I’m working on that at the moment. App sizing is definitely the weak point of Beta1.
1, nope I mean from print statements appearing on the Xcode console.
2, cool, great!
Re: those annoying date/time stamps in the xCode console window.
I think the answer is, “No.”
If anyone does have a solution however please share, because they make reading the debug output of code painful (to put it nicely).
For those who don’t know what we’re talking about this is an example:
May 13 11:30:51 Edward-Fs-iPad example[10057] \<Warning\>: math.sin(1.570796)............ 0.99999999999995 May 13 11:30:51 Edward-Fs-iPad example[10057] \<Warning\>: math.cos(1.570796)............ 3.2679489653814e-07 May 13 11:30:51 Edward-Fs-iPad example[10057] \<Warning\>: 5 ---------------------------------- May 13 11:30:51 Edward-Fs-iPad example[10057] \<Warning\>: math.sin(1.5708).............. 0.99999999999325 May 13 11:30:51 Edward-Fs-iPad example[10057] \<Warning\>: math.cos(1.5708).............. -3.6732051033466e-06
The above would be better with out this nonsense:
May 13 11:30:51 Edward-Fs-iPad example[10057] \<Warning\>:
Note: This topic is a ‘Corona Cards’ specific question, but for those reading this and saying, “Hey! I see those stinky messages in my normal output.”,
Perry has already answered. It seems by default print statements in Lua/Corona are implemented via NSLog().
Unfortunately, I think that is a here to stay feature. However, one can always ask: “Would it be possible to add an alternative print function that uses printf() instead?”
More on this topic: http://stackoverflow.com/questions/1354728/in-xcode-is-there-a-way-to-disable-the-timestamps-that-appear-in-the-debugger-c
Unless we could disable them and make our own Lua print to Obj c Interop printf().
Yes I didn’t want to moan too much but when I have several combined stats in one print line it almost goes off the screen so have to fiddle with the editor width , making it a PITA
The decoration of messages is toned down in the Corona Simulator Console window but I’m not going to get into how it does that. If you are interested and shell savvy and you can figure it out.
The general topic is one that comes up quite a bit but there doesn’t seem to be a way to fix it in a general way, just by using a logging function other than NSLog():
Unfortunately, for a variety of reasons, it’s not as simple as Lua print() just using printf() instead of NSLog() (on OS X/iOS) but I’ll take a look at what can be done. We do assume that output to the console is generally for debugging purposes rather than production code.
Like I said, “probably here to stay”.
Also I should have said, “not as important as other stuff for sure.”
Thanks for even considering looking at it.
Just been reading about NS Log. How its appears on release builds, how ASL can be an alternative and how NS log is really meant only for logs. Could be the solution? When I have some spare time I will give it a try but not high priority.
http://doing-it-wrong.mikeweller.com/2012/07/youre-doing-it-wrong-1-nslogdebug-ios.html
I have a quick solution for the errors.
I hacked the print function like so , then add this the obj-c side in viewController mm :
-LUA
print=function(text)
local result = Runtime:dispatchEvent( { name=“coronaView”, debug="\n"…text…"\n" });
end
///////////OBJ c
{
if ([event objectForKey:@“debug”]){
printf("%s", [[event objectForKey:@“debug”] UTF8String]);
}
}
Can I change the print output on Xcode to not display the time , date, seconds, name of app and and the other bits?
You mean when you output something with NSLog()? Try using printf().
Is it possible to set a scaling window or make sure the view fits the window without the empty canvas?
I’m working on that at the moment. App sizing is definitely the weak point of Beta1.
1, nope I mean from print statements appearing on the Xcode console.
2, cool, great!
Re: those annoying date/time stamps in the xCode console window.
I think the answer is, “No.”
If anyone does have a solution however please share, because they make reading the debug output of code painful (to put it nicely).
For those who don’t know what we’re talking about this is an example:
May 13 11:30:51 Edward-Fs-iPad example[10057] \<Warning\>: math.sin(1.570796)............ 0.99999999999995 May 13 11:30:51 Edward-Fs-iPad example[10057] \<Warning\>: math.cos(1.570796)............ 3.2679489653814e-07 May 13 11:30:51 Edward-Fs-iPad example[10057] \<Warning\>: 5 ---------------------------------- May 13 11:30:51 Edward-Fs-iPad example[10057] \<Warning\>: math.sin(1.5708).............. 0.99999999999325 May 13 11:30:51 Edward-Fs-iPad example[10057] \<Warning\>: math.cos(1.5708).............. -3.6732051033466e-06
The above would be better with out this nonsense:
May 13 11:30:51 Edward-Fs-iPad example[10057] \<Warning\>:
Note: This topic is a ‘Corona Cards’ specific question, but for those reading this and saying, “Hey! I see those stinky messages in my normal output.”,
Perry has already answered. It seems by default print statements in Lua/Corona are implemented via NSLog().
Unfortunately, I think that is a here to stay feature. However, one can always ask: “Would it be possible to add an alternative print function that uses printf() instead?”
More on this topic: http://stackoverflow.com/questions/1354728/in-xcode-is-there-a-way-to-disable-the-timestamps-that-appear-in-the-debugger-c
Unless we could disable them and make our own Lua print to Obj c Interop printf().
Yes I didn’t want to moan too much but when I have several combined stats in one print line it almost goes off the screen so have to fiddle with the editor width , making it a PITA
The decoration of messages is toned down in the Corona Simulator Console window but I’m not going to get into how it does that. If you are interested and shell savvy and you can figure it out.
The general topic is one that comes up quite a bit but there doesn’t seem to be a way to fix it in a general way, just by using a logging function other than NSLog():
Unfortunately, for a variety of reasons, it’s not as simple as Lua print() just using printf() instead of NSLog() (on OS X/iOS) but I’ll take a look at what can be done. We do assume that output to the console is generally for debugging purposes rather than production code.
Like I said, “probably here to stay”.
Also I should have said, “not as important as other stuff for sure.”
Thanks for even considering looking at it.
Just been reading about NS Log. How its appears on release builds, how ASL can be an alternative and how NS log is really meant only for logs. Could be the solution? When I have some spare time I will give it a try but not high priority.
http://doing-it-wrong.mikeweller.com/2012/07/youre-doing-it-wrong-1-nslogdebug-ios.html
I have a quick solution for the errors.
I hacked the print function like so , then add this the obj-c side in viewController mm :
-LUA
print=function(text)
local result = Runtime:dispatchEvent( { name=“coronaView”, debug="\n"…text…"\n" });
end
///////////OBJ c
{
if ([event objectForKey:@“debug”]){
printf("%s", [[event objectForKey:@“debug”] UTF8String]);
}
}