Class RomlObject

A wrapper for ROBLOX objects that contains methods for finding objects within the hierarchy.

Info:

  • License: MIT
  • Author: Richard Voelker

Methods

RomlObject.new (self, romlDoc, object, objectId[, classes={}]) Create a new RomlObject.
RomlObject.SetParent (self, parent) Sets the parent of this RomlObject and updates any children lists.
RomlObject.GetRobloxObject (self)
RomlObject.ObjectName (self)
RomlObject.Refresh (self) Sets the properties of the RomlObject to its associated ROBLOX object, sending the properties through any filters if necessary.
RomlObject.StyleObject (self, properties) Changes the properties of the wrapped ROBLOX object without changing the inline properties of this object.
RomlObject.AddChild (self, child) Add a child RomlObject to this RomlObject.
RomlObject.SetProperties (self, properties) Sets the properties to the RomlObject.
RomlObject.SetClasses (self, classes)
RomlObject.RemoveAllChildren (self) Removes all children from this object.
RomlObject.GetId (self)
RomlObject.GetObjectId (self)
RomlObject.GetClasses (self)
RomlObject.RemoveChild (self, child) Remove the provided child from the list of children.
RomlObject.HasClass (self, className) Returns whether or not this RoML Object has the given class or not.
RomlObject.MatchesSelector (self, selectorStack) Returns whether or not this RoML Object matches the given Stack of selectors.
RomlObject.AllowsChildren (self)
RomlObject.Find (self, selector) Find RomlObjects within this RomlObject's hierarchy using the given selector.


Methods

RomlObject.new (self, romlDoc, object, objectId[, classes={}])
Create a new RomlObject.

Parameters:

  • self RomlObject
  • romlDoc RomlDoc The RomlDoc this object belongs to.
  • object Instance

    The ROBLOX Instance to wrap with this

    RomlObject.
    
  • objectId string The ID assigned to this object.
  • classes table

    The list of classes for the

    RomlObject.
    
    (default {})
RomlObject.SetParent (self, parent)
Sets the parent of this RomlObject and updates any children lists.

Parameters:

Returns:

    Instance

    The ROBLOX object wrapped by this

    RomlObject.
    
RomlObject.GetRobloxObject (self)

Parameters:

Returns:

  1. Instance

    The ROBLOX object wrapped by this

    RomlObject.
    
  2. string The name of this object.
RomlObject.ObjectName (self)

Parameters:

Returns:

    string The name of this object.
RomlObject.Refresh (self)
Sets the properties of the RomlObject to its associated ROBLOX object, sending the properties through any filters if necessary.

Parameters:

RomlObject.StyleObject (self, properties)
Changes the properties of the wrapped ROBLOX object without changing the inline properties of this object.

Parameters:

  • self RomlObject
  • properties table The list of properties to set on the ROBLOX object.
RomlObject.AddChild (self, child)
Add a child RomlObject to this RomlObject. Throws an error if this RomlObject does not allow children.

Parameters:

RomlObject.SetProperties (self, properties)
Sets the properties to the RomlObject. The associated ROBLOX object is not updated until Refresh is called.

Parameters:

RomlObject.SetClasses (self, classes)

Parameters:

RomlObject.RemoveAllChildren (self)
Removes all children from this object.

Parameters:

Returns:

    integer The unique identifier for this RomlObject.
RomlObject.GetId (self)

Parameters:

Returns:

  1. integer The unique identifier for this RomlObject.
  2. integer The named identifier for the RomlObject as defined in the RomlDoc.
RomlObject.GetObjectId (self)

Parameters:

Returns:

  1. integer The named identifier for the RomlObject as defined in the RomlDoc.
  2. The style classes of this RomlObject.
RomlObject.GetClasses (self)

Parameters:

Returns:

    The style classes of this RomlObject.
RomlObject.RemoveChild (self, child)
Remove the provided child from the list of children.

Parameters:

RomlObject.HasClass (self, className)
Returns whether or not this RoML Object has the given class or not.

Parameters:

Returns:

    bool True if this RomlObject has the class, false if it does not.
RomlObject.MatchesSelector (self, selectorStack)
Returns whether or not this RoML Object matches the given Stack of selectors. Each element of the Stack should be a simple table with a object key, a id or class key, or both.

Parameters:

Returns:

  1. bool True if the entire Stack matches this specific RomlObject, false otherwise.
  2. bool Whether or not this RomlObject can have children RomlObjects.
RomlObject.AllowsChildren (self)

Parameters:

Returns:

    bool Whether or not this RomlObject can have children RomlObjects.
RomlObject.Find (self, selector)
Find RomlObjects within this RomlObject's hierarchy using the given selector.

Parameters:

Returns:

    table Table of matching RomlObjects.
generated by LDoc 1.4.3 Last updated 2016-07-26 17:10:04