DOMOBJECT is the base class for Lua objects representing Storyboard model objects. All other types, CONTROL, TABLE, GROUP, LAYER, LAYERINSTANCE, SCREEN extend the base functionality. In Lua, this class is called gredom#domobject.
DOMOBJECT:get_name()
Gets the name of the specified DOM Object
Returns: The name of the specified DOMOBJECT
DOMOBJECT:get_type()
Gets the Storyboard type of the specified DOMOBJECT. The type may be one of gredom.APP, gredom.SCREEN, gredom.LAYER, gredom.LAYER_INSTANCE, gredom.GROUP, gredom.CONTROL, gredom.TABLE, gredom.TEMPLATE.
Returns: A the type of the specified DOMOBJECT.
DOMOBJECT:get_parents()
Gets the parent DOMOBJECT objects for the specified DOMOBJECT. An array of parents is returned because in some cases, such as for a layer, there may be more than one parent representation.
Returns: An array table containing the parent DOMOBJECT entries.
DOMOBJECT:get_children()
Gets the child DOMOBJECT objects for the specified DOMOBJECT. This function returns only the model objects and does not include the variables.
Returns: An array table containing the child DOMOBJECT entries
DOMOBJECT:get_variables()
Gets variables associated with the specified DOMOBJECT
Returns: An array table containing the variables associated with this object.
DOMOBJECT:get_value( key [, key2, ...] )
Gets one or more values from the data manager. Each argument to the function should be a key relative to the DOMOBJECT. The keys are fully qualified before being used as a data manager key whose value should be extracted from the data manager. This function returns multiple values if multiple parameters are provided.
Parameters: key A relative key, to be fully qualified in the context of this DOMOBJECT. Returns: The value associated with the data manager entry for the key, or nil if no entry exists. If multiple keys are specified, then multiple return values will be generated matching the argument order.
DOMOBJECT:get_data( key [, key2, ...] )
Gets one or more values from the data manager. Each argument to the function should be a key relative to the DOMOBJECT. The keys are fully qualified before being used as a data manager key whose value should be extracted from the data manager. This function returns a table using all the keys as indexes and the corresponding value is the data returned from the data manager. A nil is returned for any values that do not match a key in the data manager.
Parameters: key A relative key, to be fully qualified in the context of this DOMOBJECT. Returns: A table containing the passed in arguments as keys and the resulting data manager values as the values associated with those keys.
DOMOBJECT:set_value( key, value [, key2, value2, ...] )
Sets one or more values in the data manager. Each key should be relative to the DOMOBJECT. The keys are fully qualified before being used as a data manager key.
Parameters: key A relative key, to be fully qualified in the context of this DOMOBJECT value The value to be assigned
DOMOBJECT:set_data( table )
Sets one or more items in the Storyboard application's data manager. Each key should be relative to the DOMOBJECT. The keys are fully qualified before being used as a data manager key.
Parameters: table A table containing the variable to change as the relative key and the value to change it to as the fully qualified key's value.
DOMOBJECT:key( name )
Get a fully qualified key from a key that is relative to the DOMOBJECT. This function does not ensure that the fully qualified key is valid.
string.format("%s.%s, DOMOBJECT:get_name(), name)
Parameters: name A string containing a relative key, to be fully qualified in the context of this DOMOBJECT Returns: A fully qualified string.