<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"var\(--jp-code-font-family\)";}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Courier New";}
span.ansi-red-fg
        {mso-style-name:ansi-red-fg;}
span.ansi-green-fg
        {mso-style-name:ansi-green-fg;}
span.ansi-cyan-fg
        {mso-style-name:ansi-cyan-fg;}
span.ansi-yellow-fg
        {mso-style-name:ansi-yellow-fg;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style></head><body lang=EN-US link=blue vlink="#954F72"><div class=WordSection1><p class=MsoNormal>This issue doesn’t have anything to do with setDEF.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Please address this problem after setDEF.  Thanks, Don!</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>There’s probably more than one setIS or something like that.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>John</p><p class=MsoNormal>Sent from <a href="https://go.microsoft.com/fwlink/?LinkId=550986">Mail</a> for Windows 10</p><p class=MsoNormal><o:p> </o:p></p><div style='mso-element:para-border-div;border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal style='border:none;padding:0in'><b>From: </b><a href="mailto:yottzumm@gmail.com">John Carlson</a><br><b>Sent: </b>Tuesday, May 14, 2019 11:33 AM<br><b>To: </b><a href="mailto:brutzman@nps.edu">Don Brutzman</a>; <a href="mailto:x3d-public@web3d.org">X3D Graphics public mailing list</a>; <a href="mailto:aono@tut.jp">aono@tut.jp</a><br><b>Subject: </b>Simple example of X3DConcreteNode/addChild problem</p></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Example of error generated below.  (minimal amount of code) Jupyter export attached.  I hope you can address the issue sometime with X3DJSAIL.  My best guess is that pyjnius is going through getSuperclass() and finding the abstract classes’ method setIS().  We can try deleting getSuperclass call in pyjnius if you think it’s appropriate.<o:p></o:p></p><p class=MsoNormal>My suggestion is to delete setIS from X3DConcreteNode.java or implement addChild in X3DConcreteNode.java, which may just cascade the error.  I think deleting setIS might be preferable, but test both cases.   Consider a wrapping, like:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Transform(Transform().setIS(IS())).addChild(Shape())  # hasn’t been tested, but ew.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>A jnius.cast would work similarly.  We can go with a cast if you like.  Please look into a cast to see what you prefer.  Also, try converting to Java.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Now do you see where the abstract class is coming from?  Do you agree on what’s introducing the abstract class (not me)?<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Good news is, I and Michael figured out how to run the code in Jupyter Lab (anaconda).  There are instructions online that work with the conda.bat command install jnius (see conda install on pyjnius website)  WooHoo! Highly recommended, but a bit stilted to start with.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Code is back to you! Looking for changes to X3DConcreteNode.java.  I can make changes to the serializer if we decide wrapping or casting is appropriate.  I just think we’ll be wrapping the wrapping the wrapping.  It seems better to me to add or delete abstract methods.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>No, I don’t know why @Override didn’t work.<o:p></o:p></p><p class=MsoNormal># This code shows the error<o:p></o:p></p><p class=MsoNormal>import jnius_config<o:p></o:p></p><p class=MsoNormal>jnius_config.set_classpath('.', 'c:/x3d-code/www.web3d.org/x3d/stylesheets/java/jars/X3DJSAIL.3.3.full.jar')<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>from jnius import autoclass<o:p></o:p></p><p class=MsoNormal>Shape = autoclass('org.web3d.x3d.jsail.Shape.ShapeObject')<o:p></o:p></p><p class=MsoNormal>Transform = autoclass('org.web3d.x3d.jsail.Grouping.TransformObject')<o:p></o:p></p><p class=MsoNormal>IS = autoclass('org.web3d.x3d.jsail.Core.ISObject')<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><div style='border:none;border-bottom:double windowtext 2.25pt;padding:0in 0in 1.0pt 0in'><p class=MsoNormal>Transform().setIS(IS()).addChild(Shape())<o:p></o:p></p></div><pre style='word-break:break-all'><span class=ansi-red-fg><b><span style='font-family:"var\(--jp-code-font-family\)";color:#E75C58'>-------------------------------------------------------------------------</span></b></span><span style='font-family:"var\(--jp-code-font-family\)"'><o:p></o:p></span></pre><pre style='word-break:break-all'><span class=ansi-red-fg><b><span style='font-family:"var\(--jp-code-font-family\)";color:#E75C58'>AttributeError</span></b></span><span style='font-family:"var\(--jp-code-font-family\)"'>                            Traceback (most recent call last)<o:p></o:p></span></pre><pre style='word-break:break-all'><span class=ansi-green-fg><b><span style='font-family:"var\(--jp-code-font-family\)";color:#00A250'><ipython-input-1-62dabff95a4e></span></b></span><span style='font-family:"var\(--jp-code-font-family\)"'> in <span class=ansi-cyan-fg><span style='color:#60C6C8'><module></span></span><o:p></o:p></span></pre><pre style='word-break:break-all'><span class=ansi-green-fg><span style='font-family:"var\(--jp-code-font-family\)";color:#00A250'>      8</span></span><span style='font-family:"var\(--jp-code-font-family\)"'> <o:p></o:p></span></pre><pre style='word-break:break-all'><span class=ansi-green-fg><span style='font-family:"var\(--jp-code-font-family\)";color:#00A250'>      9</span></span><span style='font-family:"var\(--jp-code-font-family\)"'> <o:p></o:p></span></pre><pre style='word-break:break-all'><span class=ansi-green-fg><b><span style='font-family:"var\(--jp-code-font-family\)";color:#00A250'>---> 10</span></b></span><span class=ansi-yellow-fg><b><span style='font-family:"var\(--jp-code-font-family\)";color:#DDB62B'> </span></b></span><span style='font-family:"var\(--jp-code-font-family\)"'>Transform<span class=ansi-yellow-fg><b><span style='color:#DDB62B'>().</span></b></span>setIS<span class=ansi-yellow-fg><b><span style='color:#DDB62B'>(</span></b></span>IS<span class=ansi-yellow-fg><b><span style='color:#DDB62B'>()).</span></b></span>addChild<span class=ansi-yellow-fg><b><span style='color:#DDB62B'>(</span></b></span>Shape<span class=ansi-yellow-fg><b><span style='color:#DDB62B'>())</span></b></span><o:p></o:p></span></pre><pre style='word-break:break-all'><span style='font-family:"var\(--jp-code-font-family\)"'><o:p> </o:p></span></pre><pre style='word-break:break-all'><span class=ansi-red-fg><b><span style='font-family:"var\(--jp-code-font-family\)";color:#E75C58'>AttributeError</span></b></span><span style='font-family:"var\(--jp-code-font-family\)"'>: 'org.web3d.x3d.jsail.X3DConcreteNode' object has no attribute 'addChild'<o:p></o:p></span></pre><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></p></div></body></html>