[x3d-public] X3DJSAIL errors when compiling Java generated from X3DresourcesJSON examples. Needs work

yottzumm at gmail.com yottzumm at gmail.com
Thu Feb 2 06:47:56 PST 2017


Here’s confirmation that commas are working properly.  Diff between input JSON and output JSON:

<                           "@string":["BooleanSequencerPrototype","defines a prototype","","Click on this text to see","BooleanSequencerExample"," scene"],
---
> "@string":["BooleanSequencerPrototype","defines a prototype","","Click on this text
> to see","BooleanSequencerExample"," scene"],


I’m not getting any MIDDLE, MIDDLE errors either.  On to the next.

John

Sent from Mail for Windows 10

From: yottzumm at gmail.com
Sent: Thursday, February 2, 2017 9:29 AM
To: Don Brutzman
Cc: Roy Walmsley; X3D Graphics public mailing list
Subject: RE: X3DJSAIL errors when compiling Java generated from X3DresourcesJSON examples. Needs work

Don Brutzman wrote:
➢ myFontStyle.setFamily ("SERIF")
                   .setJustify(new String[] {"\"MIDDLE\",\"MIDDLE\""})
                   .setTopToBottom(true);

Hmm.   I see the comma now.  This is not exactly easy to generate from XML.  Please either use space, or use a two element array.  If you still insist on this form, I will try to comply, but it sure is making things difficult, and I hope this applies to ALL MFStrings, because that’s how I am using MFString’s right now.  Whatever we decide for one MFString should apply to all MFStrings.  Let me know.


Here’s how I’m handling MFStrings in JavaScript right now:

                                        } else if (attrType === "MFString") {
                                                str += "new String[] {\""+attrs[a].nodeValue.replace(/"/g, '\\"')+"\"}";
      
It should be easy enough to put in a split/join to add the comma. I think I had that before.  It would just be cool if we could make this code work for all MFStrings in X3DJSAIL.  Let me know.  I will try adding the split/join and report on results.

John


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20170202/15384a82/attachment.html>


More information about the x3d-public mailing list