[x3d-public] X3DJSAIL:Interestingexception, but...tableforstringconversionexamples [ possible solution on agreement between Don's MFString's and my MFString's ]

John Carlson yottzumm at gmail.com
Wed May 24 22:06:45 PDT 2017

Solution: Modify the MFString String array constructor in X3DJSAIL to double the number of \’s,  \\ quote “ and on perhaps do the same on MFString constructors.   See problems below.

We should test "\\\\" as an SFString in an MFString.

Here’s one that really gets me, \\\\ (supposedly two slashes in rendered X3D):

In my Java:

return new MFStringObject(new java.lang.String[] {"Node3 \\\\ \\ ","Node3\"\"\""});

Seem reasonable enough.

In Don’s Java:

        .setGeometry(new TextObject().setString(new MFStringObject("\"Node3 \\\\
\\\\ \\\\ \" \"Node3\\\"\\\"\\\"\""))

Why do we need so many \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\?  Don needs it because he’s representing an MFString as a String, instead of an array, so he can distinguish a " from a \" (I use arrays, so I only see a \" as "  in Java


"@string":["Node3 \\\\ \\ ","Node3\"\"\""],


<Text string='"Node3 \\\\ \\ " "Node3\"\"\""'>

Intermediate XML (wrong.  Hmm):

    <Text length='' maxExtent='0.0' solid='false' string='"Node3 \\ \ " "Node3""' class=''>

My Java output JSON (one slash become two slashes?  Wrong hmm.)

"@string":["Node3 \\ \\ ","Node3\""],

My JavaScript output XML (wrong)

<Text string='"Node3 \\ \ " "Node3"""'>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20170525/9bd848bf/attachment.html>

More information about the x3d-public mailing list