[x3d-public] X3D Java SAI. ROUTE Event Source/Destination discussion

yottzumm at gmail.com yottzumm at gmail.com
Wed Jan 18 03:16:20 PST 2017


www_web3d_org/x3d/content/examples/X3dForWebAuthors/KelpForestExhibit/StripedSurfPerchPlaque
Exception in thread "main" org.web3d.x3d.sai.InvalidFieldValueException: ROUTE has source-destination type mismatch. ROUTE event destination must have accessType='inputOutput' or accessType='outputOnly'. ,       FROM BlueRockfishTouchSensor.touchTime (TouchSensor.SFTime.outputOnly) TO BLUEROCKFISHCLOCK.set_startTime (TimeSensor.UnknownField_TimeSensor.UnknownField_TimeSensor)
        at org.web3d.x3d.java.Core.ROUTEObject.validate(ROUTEObject.java:496)
        at org.web3d.x3d.java.Core.SceneObject.validate(SceneObject.java:427)
        at org.web3d.x3d.java.Core.X3DObject.validate(X3DObject.java:1434)
        at org.web3d.x3d.java.Core.X3DObject.toFileJSON(X3DObject.java:657)
        at www_web3d_org.x3d.content.examples.X3dForWebAuthors.KelpForestExhibit.StripedSurfPerchPlaque.main(StripedSurfPerchPlaque.java:347)


I am constructing field objects like this:
                fieldObject field0_0_4_0_0 = new fieldObject();
                  field0_0_4_0_0.setName("xtranslation");
                  field0_0_4_0_0.setAccessType("inputOutput");
                  field0_0_4_0_0.setType("SFVec3f");
                  field0_0_4_0_0.setValue("0 0 0");
And not like this:
fieldObject outputColorsField = new fieldObject(outputColorsFieldName, fieldObject.TYPE_MFCOLOR, fieldObject.ACCESSTYPE_OUTPUTONLY);

However, in this particular file, no fields are present.  So I guess I’ll have to construct them for each route as I build the route?  Thanks, trying to automate.  Also, I’m trying to figure out what to do WHEN the fields are present.

Or can the validate routines ignore the accessType if it’s not specified?  Or construct the fieldObject when a string is specified in a ROUTEs fromField or toField?

Question, if we do put the fields in the code, will they appear in the JSON when we don’t want them to?

Thanks,

John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20170118/6a7d20dc/attachment-0001.html>


More information about the x3d-public mailing list