field and exposedField in PROTO's
Hi,
Me again.:)
It doesn't seem like a problem for my proto, but for my script. All fields
of my PROTO which are not used in my script, get no error.
e.g.
PROTO VBox
[
exposedField position 0 0 0
]
{
DEF Tr Transform
{
translation IS position
Shape
{
geometry Box {}
}
}
DEF script1 Script
{
field SFVec3f pos IS position
url "javascript: ........"
}
Quote:
}
NOTE: This script isn't the real script.
I get a type mismatch (or something like that). When i use exposedField
SFVec3f .... , it says expected end of file at line "where exposedField is".
Do I have to handle it with eventIn's then ? If i do, how can i do it then ?
Thanks
Gerry
Quote:
>Hi,
>I created some PROTO a few months ago when i was learning vrml. But then, i
>didn't see the point of using exposedField in my PROTO's.
>Creating my EAI, i realized that i do need to declare them exposedField so
i
>can simply getEventOut("position_changed");
>But when i changed my field into exposedField, (in my Protofile and
>EXTERNPROTO definition), Cosmoplayer gives an error like:
>"EXTERNPROTO field \'positie\' improperly type matched"
>I just found out if i change it only in my EXTERNPROTO definition, i don't
>get an error. Can i use the eventOut then ?
>Thanks 2 all of you,
>Gerry