Please can any one tell me how to generate persistent console log
I am having some performance issues using images with livecode in IOS. The function below show the time between each profile in the message box
but the problem is it over write the previous profile - I'd like it to append to the end like usual console log output. How do I generate persistent console log?
command profile profileMessage
--local vars
local currentProfileTime
--get current time
put the milliseconds into currentProfileTime
--subtract PREVIOUS time from current time and set as since since last time
put currentProfileTime - lastProfileTime into timeSinceLastProfile
--**output the profile diagnostics**
--put message plus current time plus time since last time
put profileMessage & " : " & timeSinceLastProfile & return
--set the last profile time
put currentProfileTime into lastProfileTime
end profile
console output from desktop livecode
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: console output from desktop livecode
Hi pynadathraju,
at first some hints::
PROFILE might be a reserved word and should not be used as the name of a handler or something!
-> put X INTO Y
will of course OVERWRITE the contents of Y everytime!
So you should use:
-> put CR & X AFTER Y
1. Use (hidden) field to store your info:
put CR & yourDataHere AFTER fld "your field here"
2. Use a global or local variable, whatever fits your needs:
global tVariable
## local tVariable
put CR & YourDataHere AFTER tVariable
3. Write directly o a file on disk:
put CR & yourDataHere AFTER URL("file:" & "path/to/file/here/mylog.txt")
Hope that helps!
And welcome to the forum!
Best
Klaus
P.S.
LiveCode is DIFFERENT, as you might have noticed.
Here are some very good learning resources, please take a look:
http://www.runrev.com/developers/lesson ... nferences/
at first some hints::
PROFILE might be a reserved word and should not be used as the name of a handler or something!
-> put X INTO Y
will of course OVERWRITE the contents of Y everytime!
So you should use:
-> put CR & X AFTER Y
A LOG is nothing but a lot of informative TEXT, so you have a lot of options:How do I generate persistent console log?
1. Use (hidden) field to store your info:
put CR & yourDataHere AFTER fld "your field here"
2. Use a global or local variable, whatever fits your needs:
global tVariable
## local tVariable
put CR & YourDataHere AFTER tVariable
3. Write directly o a file on disk:
put CR & yourDataHere AFTER URL("file:" & "path/to/file/here/mylog.txt")
Hope that helps!
And welcome to the forum!

Best
Klaus
P.S.
LiveCode is DIFFERENT, as you might have noticed.

Here are some very good learning resources, please take a look:
http://www.runrev.com/developers/lesson ... nferences/
Re: console output from desktop livecode
Note that all screen-udates are very slow. If you update the message box even twice per second, it will slow down your code execution considerably. Make sure to not update fields or the message box too often when doing logging.
Various teststacks and stuff:
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
-
- Posts: 4
- Joined: Wed May 11, 2011 9:47 am
Re: console output from desktop livecode
Hi Klaus,
Thanks for the resources. Let me have a look at it
Thanks for the resources. Let me have a look at it