Castle Game Engine: X3DCastleScript: Class TCasScriptX3DValueList

# Class TCasScriptX3DValueList
Description | Hierarchy | Fields | Methods | Properties
## Unit X3DCastleScript ## Declaration `type TCasScriptX3DValueList = class(TCasScriptValueList)` ## Description no description available, TCasScriptValueList description follows ## Hierarchy TFPGObjectList TCasScriptValueList TCasScriptX3DValueList ## Overview ### Methods
| `constructor Create(AFreeObjects: boolean);`
| `destructor Destroy; override;`
| `procedure Add(FieldOrEvent: TX3DFieldOrEvent);`
| `procedure BeforeExecute;`
| `procedure AfterExecute;`
| `procedure ResetLastEventTimes;`
### Properties
| `property FieldOrEvents: TX3DFieldOrEventList read FFieldOrEvents;`
## Description ### Methods
| `constructor Create(AFreeObjects: boolean);`
| `destructor Destroy; override;`
| `procedure Add(FieldOrEvent: TX3DFieldOrEvent);`
Create TCasScriptValue descendant suitable to hold FieldOrEvent value, and add it to Items. FieldOrEvent is added to FieldOrEvents list, so we keep all information.
| `procedure BeforeExecute;`
| `procedure AfterExecute;`
| `procedure ResetLastEventTimes;`
Clear the memory when the last events were generated from this script. For each script output-capable field (inputOutput or outputOnly) on this list, we keep track of when it last generated an event. This is needed to avoid loops. Some background info why this is needed: X3D spec says (4.4.8.3 Execution model): Nodes that contain output events shall produce at most one event per field per timestamp. [...] This also applies to scripts. "[...]" above talks about ROUTE breaking rule, we handle this generally in TX3DRoute. The trouble with script is that it can make loops even without the help of ROUTEs: script receives it's inputs, and sends it's outputs, so when you send an output that causes your own input you made a loop... The most trivial example of this is when on receiving inputOutput you will set the very same inputOutput field, thus making a loop. Scripts with directOutput (although not implemented yet) can cause even more trouble, as you can generate input event on another node that will get back to you. If two scripts generate events on each other, this can again make a loop, without the help of ROUTEs. So we have to secure against this. This is done pretty much like with ROUTEs: we just remember the last timestamp, and ignore sending events again.
### Properties
| `property FieldOrEvents: TX3DFieldOrEventList read FFieldOrEvents;`
List of field/events associated with this list's CasScript variables. This list is read-only (use Add to add here). It always has the same Count as our own count.
Generated by PasDoc 0.13.0 on 2015-06-15 04:43:13