Unable to find SystemConsole class

Oct 3, 2012 at 11:19 PM
Edited Oct 3, 2012 at 11:20 PM

So, I went to downloads page got the latest thing (updated in May), referenced the DLL, and got JS code working fine.

Till this code that requires the console, I tried the code in the homepage and documentation here:

context.SetParameter("console", new SystemConsole());

But it doesn't work. I can't find the SystemConsole class at all.

It feels that I'm missing something very obvious, what could it be?

Oct 4, 2012 at 2:00 PM

You need to create that class yourself; it's in the documentation right above that line of code.

public class SystemConsole
     public SystemConsole() { }

     public void Print(string iString) {
Oct 7, 2012 at 7:13 AM

Thanks a lot. Yeah, not sure have I overlooked this is the same thing (I originally looked at the home page and the line following:

Set variables in the Javascript context's global scope: SetParameter(string iName, Object iObject);

But anyway, sounds fine. I just thought the console API is standard or something, at least stuff like console.log, but that's all good.