62,12 → 62,11 |
|
try { |
// undocumented features: when |
// $net_outlyer.runtime.internal.shell.autoEOL is true an extra println() is |
// $net_outlyer.runtime.internal.shell,autoEOL is true an extra println() is |
// issued after each eval |
// and when |
// $net_outlyer.runtime.internal.shell.inspect is true the result |
// of each line is automatically printed |
// arrayDump is used internally to print JavaScript arrays |
rhino.eval(getInternalObjectFieldName("shell")+" = { " + |
" autoEOL: false, inspect: true, arrayDump: null };"); |
jsArray = rhino.eval("new Array()"); |
75,8 → 74,8 |
// Define the arrayDump internal function |
rhino.eval(arrayDumpFn+ |
" = function(arr) {\n" + |
" if (0==arr.length) { java.lang.System.out.println('[]'); return; }\n"+ |
" var s = new String('[');" + |
" var s = new String();" + |
" s += '[';\n" + |
" for (var i=0;i<arr.length;++i) {\n" + |
" s += arr[i]+',';\n" + |
" }\n" + |
156,7 → 155,7 |
pe.exportObject("ui", new GUI()); |
pe.exportObject("gui", new GUI()); |
pe.exportObject("cui", new UI()); // cui stands for Console UI |
pe.exportObject("lang", new RedundantLanguageExtensions()); |
pe.exportObject("lang", new LanguageExtensions()); |
final PluginObject po = new PluginObject(); |
pe.setPluginObject(po); |
|