CONTROL:clone

CONTROL:clone(
    new_object_name,
    parent_name,
    data
)

Create a new control (new_object_name), within an existing parent layer or group (parent_name) by copying all of the properties of this control. This new object will have all of the same actions, variables and it's current state will match the state of this control.

The data argument is a table of properties that match the properties for that type of object as described in the gre.set_control_attrs or gre.set_table_attrs functions as applicable.


Parameters:
        new_object_name          The name for the new object, this must be a unique name in the parents namespace
        parent_name              The name of the layer or group to place this object within, this object must exist
        data                     Optional: A table containing control attribute tags as the keys with new values to be applied.
Returns:
        A CONTROL object representing the newly created control.