Closed benzoid closed 11 months ago
Yes thanks. This was fixed some time ago in SwingJS, just did not get transmitted to Jalview.
On Fri, Jun 9, 2023, 2:48 PM benzoid @.***> wrote:
Hi Bob, When trying to set Info = { ... console: window.console, ... } I got an error after launching jalviewjs: TypeError: con.err is not a function loading file swingjs/j2s/java/lang/Class.js TypeError: con.err is not a function at Con.consoleOutput (file://.../site/swingjs/swingjs2.js:16966:11) at file://.../site/swingjs/swingjs2.js:17302:33 at ... .
It looks like it should be error(s): this PR changes it in two files. There is a workaround of defining con.err(s) with window.console.err = function() { this.error.apply(this,arguments); } but presumably better to fix at source. Ben
P.S. The context of this is piping the sysoutdiv output to shell STDERR of chromium running in headless mode so that we can look for specific output of JalviewJS to detect launch, or other operations:
mkdir -p /tmp/chrome/TEMP touch "/tmp/chrome/TEMP/First Run" chrome --headless=new --timeout=15000 --virtual-time-budget=15000 --user-data-dir=/tmp/chrome --profile-directory=TEMP --allow-file-access-from-files --enable-logging=stderr ./site/launcher_with_window_console.html
You can view, comment on, or merge this pull request online at:
https://github.com/BobHanson/java2script/pull/259 Commit Summary
- 28a4edb https://github.com/BobHanson/java2script/pull/259/commits/28a4edb4f77b82d83b07ecd3d2ad4b6114cc00da Change con.err() to con.error()
File Changes
(2 files https://github.com/BobHanson/java2script/pull/259/files)
- M sources/net.sf.j2s.java.core/srcjs/js/j2sClazz.js https://github.com/BobHanson/java2script/pull/259/files#diff-4313952fb550cf2f93ee52a35a9e3228649472859da67d65249e4325736280cf (2)
- M sources/net.sf.j2s.java.core/srcjs/swingjs2.js https://github.com/BobHanson/java2script/pull/259/files#diff-6676e5f02d38c50b48417f416f2d0ff43f5b2f625ba2f91dacd688db80064a7f (2)
Patch Links:
- https://github.com/BobHanson/java2script/pull/259.patch
- https://github.com/BobHanson/java2script/pull/259.diff
— Reply to this email directly, view it on GitHub https://github.com/BobHanson/java2script/pull/259, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEHNCW4I75NKTDP7AOLNBQLXKLS4TANCNFSM6AAAAAAZAMESEA . You are receiving this because you are subscribed to this thread.Message ID: @.***>
no actual change was done in this merge
Hi Bob, When trying to set Info = { ... console: window.console, ... } I got an error after launching jalviewjs: TypeError: con.err is not a function loading file swingjs/j2s/java/lang/Class.js TypeError: con.err is not a function at Con.consoleOutput (file://.../site/swingjs/swingjs2.js:16966:11) at file://.../site/swingjs/swingjs2.js:17302:33 at ... .
It looks like it should be error(s): this PR changes it in two files. There is a workaround of defining con.err(s) with window.console.err = function() { this.error.apply(this,arguments); } but presumably better to fix at source. Ben
P.S. The context of this is piping the sysoutdiv output to shell STDERR of chromium running in headless mode so that we can look for specific output of JalviewJS to detect launch, or other operations:
mkdir -p /tmp/chrome/TEMP touch "/tmp/chrome/TEMP/First Run" chrome \ --headless=new \ --timeout=15000 \ --virtual-time-budget=15000 \ --user-data-dir=/tmp/chrome \ --profile-directory=TEMP \ --allow-file-access-from-files \ --enable-logging=stderr \ ./site/launcher_with_window_console.html