Difference between revisions of "NET:LavishScriptAPI.LavishScriptObject.GetMember"
Jump to navigation
Jump to search
Bountycode (talk | contribs) (→C#) |
|||
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()); | ||
} | } |
Revision as of 20:42, 12 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, string[] indices)
Parameters
- string Name
- Name of the member to access
- 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();