diff -r 8198c73b9e1f -r 461da1f79f43 org.symbian.tools.wrttools.previewer/preview/script/lib/console.js --- a/org.symbian.tools.wrttools.previewer/preview/script/lib/console.js Thu Jul 01 17:05:34 2010 -0700 +++ b/org.symbian.tools.wrttools.previewer/preview/script/lib/console.js Fri Jul 02 11:34:35 2010 -0700 @@ -16,12 +16,13 @@ */ // for console support -if ((typeof window.parent.console == 'undefined') || ( (/AppleWebKit/i.test(navigator.userAgent)) && !(/Version/i.test(navigator.userAgent))) ){ window.console = { sprintf: function(args){ if (typeof args == 'undefined') { return null; + } else if (typeof args == 'string') { + return args; } if (args.length < 1) { @@ -29,7 +30,7 @@ }; if (typeof args[0] != 'string') { - return null; + return this.sprintf(String(args[0])); } if (typeof RegExp == 'undefined') { @@ -126,13 +127,12 @@ // @todo } } - } + }; // enable the Console. _BRIDGE_REF.nokia.layout._console_enabled = true; _BRIDGE_REF.nokia.layout.render(); -} // make TRUE console.js script loaded window.parent.NOKIA.scriptsLoaded.console = true;