Nitro.Script Class Reference

Detailed Description

A base class that code instances derive from by default. Nitro.NitroCode.Instance returns an object which should be casted to this unless a different base type was used in the NitroCode constructor.

Inheritance diagram for Nitro.Script:
PowerUI.UICode

Public Member Functions

object Run (string functionName, params object[] args)
 Runs the named method that is contained within this script. More...
 
object Run (string functionName, Type[] typeSet, params object[] args)
 Runs the named overloaded method that is contained within this script. More...
 
virtual void OnScriptReady ()
 Any code found outside of functions is placed into this method. It's done like this so when the code is instanced it can have properties set then have this called. More...
 
object RunLiteral (string functionName, object[] args)
 Runs the named method that is contained within this script. More...
 
object RunLiteral (string functionName, Type[] typeSet, object[] args)
 Runs the named overloaded method that is contained within this script. More...
 
object RunLiteral (string functionName, object[] args, bool optional)
 Runs the named overloaded method that is contained within this script. More...
 
object RunLiteral (string functionName, Type[] typeSet, object[] args, bool optional)
 Runs the named overloaded method that is contained within this script. More...
 

Properties

object this[string property] [get, set]
 Gets or sets a field with the given name. More...
 

Member Function Documentation

virtual void Nitro.Script.OnScriptReady ( )
inlinevirtual

Any code found outside of functions is placed into this method. It's done like this so when the code is instanced it can have properties set then have this called.

object Nitro.Script.Run ( string  functionName,
params object[]  args 
)
inline

Runs the named method that is contained within this script.

Parameters
functionNameThe method to run.
argsThe arguments to pass to the method.
Returns
The returned object of the method, if any.
object Nitro.Script.Run ( string  functionName,
Type[]  typeSet,
params object[]  args 
)
inline

Runs the named overloaded method that is contained within this script.

Parameters
functionNameThe method to run.
typeSetThe types of the arguments that will be used to find the correct overload.
argsThe arguments to pass to the method.
Returns
The returned object of the method, if any.
object Nitro.Script.RunLiteral ( string  functionName,
object[]  args 
)
inline

Runs the named method that is contained within this script.

Parameters
functionNameThe method to run.
argsThe set of arguments to pass to the method.
Returns
The returned object of the method, if any.
object Nitro.Script.RunLiteral ( string  functionName,
Type[]  typeSet,
object[]  args 
)
inline

Runs the named overloaded method that is contained within this script.

Parameters
functionNameThe method to run.
typeSetThe types of the arguments that will be used to find the correct overload.
argsThe set of arguments to pass to the method.
Returns
The returned object of the method, if any.
object Nitro.Script.RunLiteral ( string  functionName,
object[]  args,
bool  optional 
)
inline

Runs the named overloaded method that is contained within this script.

Parameters
functionNameThe method to run.
argsThe set of arguments to pass to the method.
optionalTrue if calling this method is optional. No error is thrown if not found.
Returns
The returned object of the method, if any.
object Nitro.Script.RunLiteral ( string  functionName,
Type[]  typeSet,
object[]  args,
bool  optional 
)
inline

Runs the named overloaded method that is contained within this script.

Parameters
functionNameThe method to run.
typeSetThe types of the arguments that will be used to find the correct overload.
argsThe set of arguments to pass to the method.
optionalTrue if calling this method is optional. No error is thrown if not found.
Returns
The returned object of the method, if any.

Property Documentation

object Nitro.Script.this[string property]
getset

Gets or sets a field with the given name.

Parameters
propertyThe name of the field.