Difference between revisions of "NET:LavishScriptAPI.LavishScriptObject.GetMember"
Jump to navigation
Jump to search
(5 intermediate revisions by 2 users not shown) | |||
Line 9: | Line 9: | ||
*[[NET:Lavish.InnerSpace.dll#LavishScriptAPI_namespace|LavishScriptAPI namespace]] | *[[NET:Lavish.InnerSpace.dll#LavishScriptAPI_namespace|LavishScriptAPI namespace]] | ||
** [[NET:Lavish.InnerSpace.dll#LavishScript|LavishScript class]] | ** [[NET:Lavish.InnerSpace.dll#LavishScript|LavishScript class]] | ||
− | *** [[NET: | + | *** [[NET:LavishScriptAPI.LavishScriptObject|LavishScriptObject class]] |
**** GetMember function | **** GetMember function | ||
== Declaration == | == Declaration == | ||
public LavishScriptObject GetMember(string Name) | public LavishScriptObject GetMember(string Name) | ||
− | public LavishScriptObject GetMember(string Name, string[] indices) | + | public LavishScriptObject GetMember(string Name, params string[] indices) |
=== Parameters === | === Parameters === | ||
* string Name | * string Name | ||
: Name of the member to access | : Name of the member to access | ||
− | * string[] indices | + | * params string[] indices |
: Parameters, if any, to pass to the object member for dynamic retrieval | : Parameters, if any, to pass to the object member for dynamic retrieval | ||
=== Return Value === | === Return Value === | ||
− | * [[NET: | + | * [[NET:LavishScriptAPI.LavishScriptObject|LavishScriptObject]] |
: The requested object, or '''null''' | : The requested object, or '''null''' | ||
Line 39: | Line 39: | ||
uint RunningTime = 0; | uint RunningTime = 0; | ||
if (TimeObj!=null) | if (TimeObj!=null) | ||
− | RunningTime = | + | RunningTime = TimeObj.GetValue<uint>(); |
InnerSpace.Echo("Process running time in milliseconds: " + RunningTime.ToString()); | InnerSpace.Echo("Process running time in milliseconds: " + RunningTime.ToString()); | ||
} | } | ||
Line 45: | Line 45: | ||
== See Also == | == See Also == | ||
− | * [[NET: | + | * [[NET:LavishScriptAPI.LavishScriptObject|LavishScriptObject]] |
* [[IS:.NET|Inner Space .NET]] | * [[IS:.NET|Inner Space .NET]] | ||
* [[NET:Lavish.InnerSpace.dll|Lavish.InnerSpace.dll]] | * [[NET:Lavish.InnerSpace.dll|Lavish.InnerSpace.dll]] |
Latest revision as of 22:55, 16 December 2006
Contents
Overview
Used to retrieve a member of a LavishScriptObject object, results in another LavishScriptObject object.
Reference Library
Fully Qualified Name
- LavishScriptAPI.LavishScript.Objects.GetObject
- LavishScriptAPI namespace
- LavishScript class
- LavishScriptObject class
- GetMember function
- LavishScriptObject class
- LavishScript class
Declaration
public LavishScriptObject GetMember(string Name) public LavishScriptObject GetMember(string Name, params string[] indices)
Parameters
- string Name
- Name of the member to access
- params string[] indices
- Parameters, if any, to pass to the object member for dynamic retrieval
Return Value
- The requested object, or null
Examples
C#
Frame.Lock(); LavishScriptObject Obj = LavishScript.Objects.GetObject("LavishScript"); if (Obj == null) { InnerSpace.Echo("object not found"); } else { LavishScriptObject TimeObj = Obj.GetMember("RunningTime"); // ${LavishScript.RunningTime} uint RunningTime = 0; if (TimeObj!=null) RunningTime = TimeObj.GetValue<uint>(); InnerSpace.Echo("Process running time in milliseconds: " + RunningTime.ToString()); } Frame.Unlock();