NET:LavishScriptAPI.LavishScript.Objects.GetPermanentObject
From Lavish Software Wiki
Contents |
[edit]
Overview
Used to retrieve a permanent LavishScriptObject object from a LavishScript Top-Level Object. Permanent objects are exempt from post-frame cleanup. Do not use this function to retrieve a permanent reference to a non-permanent object. If the object may disappear at any point while the program is executing, the object is, by definition, temporary (i.e. not permanent).
[edit]
Reference Library
[edit]
Fully Qualified Name
- LavishScriptAPI.LavishScript.Objects.GetPermanentObject
- LavishScriptAPI namespace
- LavishScript class
- Objects class
- GetPermanentObject function
- Objects class
- LavishScript class
[edit]
Declaration
static public LavishScriptObject GetPermanentObject(string Name)
[edit]
Parameters
- string Name
- Name of the LavishScript Top-Level Object to access
[edit]
Return Value
- The requested object, or null
[edit]
Examples
[edit]
C#
Frame.Lock();
LavishScriptObject Obj = LavishScript.Objects.GetPermanentObject("LavishScript");
if (Obj == null)
{
InnerSpace.Echo("object not found");
}
else
{
/* "LavishScript" object's ToString value is its version number, which follows the form of a typical float */
float Version = Obj.GetValue<float>();
InnerSpace.Echo("LavishScript Version " + Version.ToString());
}
Frame.Unlock();
[edit]
