[x3d-public] Status, X3DPSAIL

John Carlson yottzumm at gmail.com
Fri Apr 26 13:39:18 PDT 2019


1.  We conquered most of the attribute errors.   There might be one or a few left in the X3dForWebAuthors folder.
2. Outstanding error 1:

$ python foo.py
Traceback (most recent call last):
  File "foo.py", line 8, in <module>
    .setIS(IS() \
  File "jnius\jnius_export_class.pxi", line 760, in jnius.JavaMethod.__call__
  File "jnius\jnius_conversion.pxi", line 78, in jnius.populate_args
  File "jnius\jnius_utils.pxi", line 205, in jnius.check_assignable_from
jnius.JavaException: Invalid instance of 'org/web3d/x3d/jsail/X3DConcreteNode' passed for a 'org/web3d/x3d/sai/Core/X3DNode'

Code:

$ cat foo.py
import classpath
from org.web3d.x3d.jsail.Core.ProtoBodyObject import ProtoBodyObject as ProtoBody
from org.web3d.x3d.jsail.Core.ISObject import ISObject as IS
from org.web3d.x3d.jsail.Grouping.TransformObject import TransformObject as Transform

ProtoBody() \
  .addChild(Transform() \
   .setIS(IS() \
   ) \
  )

This is because setIS returns an X3DConcreteNode (in X3DConcreteNode) and the X3DConcreteNode is not a X3DNode, despite the fact that TransformObject derives from X3DNode.    Suggest cast to X3DNode or adding additional addChild methods with additional types as parameters to ProtoBodyObject.java. Casts are seen throughout the X3DJSAIL code for addChild.  Perhaps it would be preferable to add methods which avoid casts in application code (ok in library).

What do you think?

Will start python execution process to report on additional errors (mostly stack overflows, I think).

John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20190426/5f998bf7/attachment.html>


More information about the x3d-public mailing list