[x3d-public] Changes to X3DJSAIL accepted? Final! outstanding error in my data folder for X3DJSAIL[ with my patches, of course ]

John Carlson yottzumm at gmail.com
Sat May 20 19:38:00 PDT 2017


Do I need to make changes to the stylesheet for X3DJSAIL to accept my patches?  Please let me know!  Also insure that JSON output is correct from X3DJSAIL after stylesheet changes.  You will need to will need to add my patches to make reasonable Java and JavaScript code output correct XML and JSON, methinks.  Patch to X3DJSAIL Java code is attached, Also to find field type and access types from fieldValue names in ProtoInstances and fieldValues (in the field or (Extern)ProtoDeclare field).
-------------------------------------------------------------------------------------------------------------------------------------------
Also this Exception:

Exception in thread "main" org.web3d.x3d.sai.InvalidFieldValueException: ERROR_VALUE_NOT_FOUND, ProtoInstance name field is required but no value found.
        at org.web3d.x3d.jsail.Core.ProtoInstanceObject.validate(ProtoInstanceObject.java:1088)
        at org.web3d.x3d.jsail.Core.fieldValueObject.validate(fieldValueObject.java:1010)
        at org.web3d.x3d.jsail.Core.ProtoInstanceObject.addFieldValue(ProtoInstanceObject.java:1167)
        at jdk.nashorn.internal.scripts.Script$arc_sail.:program(../nashorn/net/coderextreme/data/arc.sail.js:140)
        at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:637)
        at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:494)
        at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:393)
        at jdk.nashorn.tools.Shell.apply(Shell.java:471)
        at jdk.nashorn.tools.Shell.runScripts(Shell.java:400)
        at jdk.nashorn.tools.Shell.run(Shell.java:179)
        at jdk.nashorn.tools.Shell.main(Shell.java:143)
        at jdk.nashorn.tools.Shell.main(Shell.java:119)

Uses of ProtoInstance look like this (note, I won’t always have a DEF, so I can’t use the constructor with name and DEF.  Suggest putting name first, and making DEF optional—or can I set DEF to null?, or provide alternate constructor with just name.).  Java Code is attached –same error as JavaScript.  JavaScript is not attached because of extension.

var ProtoInstance0 = null;
var ProtoInstance1 = null;
var ProtoInstance2 = null;
var ProtoInstance3 = null;
var ProtoInstance4 = null;
var ProtoInstance5 = null;
var ProtoInstance6 = null;
var ProtoInstance7 = null;
var ProtoInstance8 = null;
var ProtoInstance9 = null;
var ProtoInstance10 = null;
var ProtoInstance11 = null;
var ProtoInstance12 = null;
        .addChild(ProtoInstance0 = new ProtoInstanceObject().setName("point").setDEF("start"))
        .addChild(ProtoInstance1 = new ProtoInstanceObject().setName("point").setDEF("end1"))
        .addChild(ProtoInstance2 = new ProtoInstanceObject().setName("point").setDEF("end2"))
        .addChild(ProtoInstance3 = new ProtoInstanceObject().setName("point").setDEF("end3"))
        .addChild(ProtoInstance4 = new ProtoInstanceObject().setName("x3dconnector").setDEF("connector1"))
        .addChild(ProtoInstance7 = new ProtoInstanceObject().setName("x3dconnector").setDEF("connector2"))
        .addChild(ProtoInstance10 = new ProtoInstanceObject().setName("x3dconnector").setDEF("connector3"))
ProtoInstance4
            .addChild(ProtoInstance5 = new ProtoInstanceObject().setName("point").setUSE("start")));
ProtoInstance4
            .addChild(ProtoInstance6 = new ProtoInstanceObject().setName("point").setUSE("end1")));
ProtoInstance4
ProtoInstance7
            .addChild(ProtoInstance8 = new ProtoInstanceObject().setName("point").setUSE("start")));
ProtoInstance7
            .addChild(ProtoInstance9 = new ProtoInstanceObject().setName("point").setUSE("end2")));
ProtoInstance7
ProtoInstance10
            .addChild(ProtoInstance11 = new ProtoInstanceObject().setName("point").setUSE("start")));
ProtoInstance10
            .addChild(ProtoInstance12 = new ProtoInstanceObject().setName("point").setUSE("end3")));
ProtoInstance10
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20170520/54527b93/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: arc.java
Type: application/octet-stream
Size: 15144 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20170520/54527b93/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: X3DJSAIL.patch
Type: application/octet-stream
Size: 17050 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20170520/54527b93/attachment-0003.obj>


More information about the x3d-public mailing list