newObjects-logo.gif (1024 bytes) ScriptManager2 and ScriptAggregate reference
Add method

Adds an interface pointer (object in script terminology) to the namespaces collection

variable = object.Add(name,globalobject)

variable boolean true if the operation was successful and false if not
object ScriptManager2 or ScriptAggregate Previously created ScriptManager2/ScriptAggregate object
name string Name of the namespace. Script will access the globalobject through this name
globalobject automation object Previously created object that will be available to the script through the given name


This method can be used in any state of the script. In all cases method adds an object to the collection used for script namespaces. When the script is not running (not yet loaded or loaded but not started) this is the only action performed by the member. When the script starts (By calling the Run method) all available objects in the collection are passed to the script engine as namespaces. In running (and connected) state Add method not only adds objects to the collection but adds them to the running script namespaces too. Thus you can add some of the namespaces in later time when they are needed - not only before strating the script.

Applies to:

ScriptManager2 and ScriptAggregate objects

See also:

C++ Helper SCPHOSTCLNT::Add method

newObjects Copyright newObjects 2001-2005