[x3d-public] X3DJSAIL: ProtoInstance fieldValue not an MFNode, but an SFNode.Complains!
John Carlson
yottzumm at gmail.com
Mon Oct 2 02:31:53 PDT 2017
I don’t see as fieldValueList in ProtoInstanceObject can ever be null, (It can have 0 elements), so the hasFieldValue() test will always return true, even if the ProtoInstance has 0 children. Please correct me if I am wrong.
From: Don Brutzman
Sent: Sunday, October 1, 2017 11:24 PM
To: John Carlson
Cc: Roy Walmsley; x3d-public at web3d.org
Subject: Re: X3DJSAIL: ProtoInstance fieldValue not an MFNode, but an SFNode.Complains!
Sorry for delay, didn't understand earlier...
The exception reports that ProtoInstance USE='G1' is not allowed to have any contained fieldValue. USE nodes can only have a containerField attribute, no children, nothing else.
That said, not seeing what line in your source code caused the exception.
On 9/13/2017 4:33 AM, John Carlson wrote:
> Not sure if this got sent. Resending
>
> Only one addChild in code, yet it complains about an MFNode. Why?
>
> Exception in thread "main" org.web3d.x3d.sai.InvalidFieldValueException: ProtoInstance USE='G1' is not allowed to have contained MFNode fieldValue
>
> at org.web3d.x3d.jsail.Core.ProtoInstanceObject.validate(ProtoInstanceObject.java:1165)
>
> at org.web3d.x3d.jsail.Core.fieldValueObject.validate(fieldValueObject.java:944)
>
> at org.web3d.x3d.jsail.Core.ProtoInstanceObject.addFieldValue(ProtoInstanceObject.java:1220)
>
> at jdk.nashorn.internal.scripts.Script$arc_sail.:program(net/coderextreme/data/arc.sail.js:148)
>
> 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)
all the best, Don
--
Don Brutzman Naval Postgraduate School, Code USW/Br brutzman at nps.edu
Watkins 270, MOVES Institute, Monterey CA 93943-5000 USA +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20171002/8ce13134/attachment-0001.html>
More information about the x3d-public
mailing list