Your Universal Remote Control Center
RemoteCentral.com
Philips Pronto Professional Forum - View Post
Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Original thread:
Post 45 made on Tuesday January 12, 2010 at 00:21
Jon Welfringer
Long Time Member
Joined:
Posts:
December 2002
175
System.Print never worked for me over a certain number of characters (don't remember how many). My solution was to write a fuction called DebugPrint() and pass it the strings I wanted. My routine then chunked the passed string into 80 character rows for printing.

This problem was present even when using the serial port mod for debugging (before I created the TCP/IP enabler).

Hopefully I'll have time to put out a new release with some tweaks in the next week or so.

....Edit....Here's what I use for System.Print

// ===================================================
// Function DebugPrint
// ===================================================
function DebugPrint(strPrint)
{
if (Debug == 1)
{
var cnt = 78 ; // characters per column to print
while (strPrint.length>0)
{ // Print line, chop input string, keep printing until string empty.
System.print(strPrint.substr(0,cnt)) ;
if (strPrint.length > cnt)
{strPrint = strPrint.slice(cnt);}
else {strPrint = "";}
}
}
}

Last edited by Jon Welfringer on January 12, 2010 00:34.


Hosting Services by ipHouse