ParallelGraphics Forums
Cortona VRML Client
You are here: [Forums]::[Browsers]::[Cortona VRML Client]

Registration 
Registration
Forgot your password?

Help 
Help
Support

Quick search 

Subscribe to newsletters 

Install Cortona VRML Client for FREE!
Outline 3D
Try RobinZone!
email:  password:
   Browsers - Cortona VRML Client

Subject: Re: eventOut routed to exposedField of Script does not
Sender: Uh 29.07.08 23:38
this file does not work as expected in Cortona 5.1 b167.
#VRML V2.0 utf8

Shape { geometry Box {}}
DEF    PS1 PlaneSensor    {}
DEF    T1 TimeSensor { loop TRUE enabled TRUE }

DEF    Program Script {
mustEvaluate TRUE directOutput    TRUE
field        SFNode    ps1    USE    PS1
eventIn        SFTime    checkSensor
exposedField    SFBool    isActive    FALSE #default
eventIn        SFBool    isActive2
url    "javascript:
function checkSensor ( t ) {
//    print ( ps1.isActive ); // direct access to PlaneSensor provides proper values
    print ( isActive ); // always prints default value, regardless of ps1.isActive value
    }
function isActive2 ( v ) {
    print ( v ); // routed to eventIn works fine
    }
"
}

ROUTE T1.time TO Program.checkSensor
ROUTE PS1.isActive TO Program.isActive
ROUTE PS1.isActive TO Program.isActive2

looks like eventOut of PlaneSensor not actually routed to exposedField...
Where is a problem ?

There isn't problem.
Accordig to ISO/IEC 14772 Script node contains any number of eventIn, field, eventOut but only one exposedField (exposedField MFString url[]).
http://www.web3d.org/x3d/specifications/vrml/ISO-IEC-14772-VRML97/part1/nodesRef.html#Script

 


eventOut routed to exposedField of Script does not / michaelusachov@mail.ru / 28.07.08 10:14
     Re: eventOut routed to exposedField of Script does not / Uh / 29.07.08 23:38
         Re: eventOut routed to expField of Script does not / michaelusachov@mail.ru / 3.08.08 11:24
         Re: eventOut routed to exposedField of Script does not / michaelusachov@mail.ru / 3.08.08 11:23

Messages in thread: 4


© 1998-2007 ParallelGraphics. All rights reserved. Terms of use.