Hi guys. I'd like to get rid of the terminal [for monitoring trace output] while developing AS3 projects. I'd like to use a command like: (code) :>/Users/{me}/Library/Preferences/Macromedia/Flash\ Player/Logs/flashlog.txt #truncate the flashlog echo "<pre>" tail -f /Users/schell/Library/Preferences/Macromedia/Flash\ Player/Logs/flashlog.txt & (/code) in order to have the contents of my flashlog.txt spill into the html output window. This would be great because I'd like to format my trace statements with HTML.
That won't update in real time, so I've written this code instead for testing: (code) cat<<-HTML <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>untitled</title> <script type="text/javascript" charset="utf-8"> function update() { var updateCommand = TextMate.system("tail -f /Users/schell/Library/Preferences/Macromedia/Flash Player/Logs/flashlog.txt", endHandler); updateCommand.onreadoutput = outputHandler;
function endHandler(s) { }
function outputHandler(currentStringOnStdout) { // Code that does something with the command’s current output like... document.getElementById("flashlog").innerText = currentStringOnStdout; } } </script> </head> <body> <button onclick="update()">UPDATE</button><br>
<pre id="flashlog"> </pre>
</body> </html> HTML (/code)
But with this code I never get any output. If I replace my 'tail -f' with something like 'ping efnx.com', I get some output. Is this because we're not allowed to access any files through this interface? Anyone have any ideas? -- Schell Scivally efsubenovex@gmail.com http://blog.efnx.com