[X3D-Public] Script field naming, proposed specification changes

Michalis Kamburelis michalis.kambi at gmail.com
Tue Jun 26 16:04:51 PDT 2012


Don Brutzman wrote:
> Proposed correction sentences:
>
> If a function represents an inputOutput field, the name of the
> corresponding function shall be the name as the field declaration
> with the set_ modifier prepended. To access the value of the
> inputOutput field, the name of the field itself shall be used without
> the _changed modifier.
>

As Don asked, I'm sharing my thoughts about this specification change
from the point of view of view3dscene author:

In short, as far as my voice in this matters: I agree 100% with the
proposed changes to the spec, and implementing them should not be a
problem for view3dscene :)

Details follow:

1. view3dscene doesn't support JavaScript yet. It is of course planned,
but so far there was never enough time to implement it properly.

We plan to use BESEN javascript engine (http://besen.sourceforge.net/ )
for this. Quick test shows that this JS engine *does* have the mentioned
problem, and so the proposed change to the spec *will be useful and
needed* in our implementation.

2. Currently, for scripting, view3dscene offers our own (quite trivial)
CastleScript language. And we have an excellent integration with native
compiled ObjectPascal code, since forever. These do not have the
problems with function/variable names being the same (CastleScript has a
separate namespace for functions and values, because that's how it was
designed; for native integration the problem doesn't exist, as it
accesses the value and registers callbacks a little differently).

Still, it will be no problem to port the proposed change to CastleScript
(I try to make it consistent with JS, where easy/possible).

Regards,
Michalis



More information about the X3D-Public mailing list