Difference between revisions of "cock.new"
(Created page with "Creates a new control object. == Synopsis == === Function === <source lang="Lua">control = cock.new ( id, data )</source> === Arguments === {{param|string|id|An identifier to us...") |
m (→Returns) |
||
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
Creates a new control object. | Creates a new control object. | ||
− | == | + | == Function == |
− | === | + | === Synopsis === |
<source lang="Lua">control = cock.new ( id, data )</source> | <source lang="Lua">control = cock.new ( id, data )</source> | ||
=== Arguments === | === Arguments === | ||
− | {{param|string|id|An identifier to use for this object. Generated automatically if not provided.}} | + | {{param|string|id|Optional. An identifier to use for this object. Generated automatically if not provided.}} |
− | {{param|table|data|Specifically formated [[ | + | {{param|table|data|Optional. Specifically formated [[Common Organization of Controls Kit Setup data|setup data]] to build layouts from. Will not instantly create layout if not provided.}} |
+ | |||
=== Returns === | === Returns === | ||
− | {{param|table|control|Newly created control object}} | + | {{param|table|control|Newly created control object.}} |
+ | |||
==See also== | ==See also== | ||
*[[cock.delete]] | *[[cock.delete]] | ||
*[[cock.find]] | *[[cock.find]] | ||
+ | *[[Common Organization of Controls Kit Setup data]] | ||
*[[parent::Common Organization of Controls Kit Manual]] | *[[parent::Common Organization of Controls Kit Manual]] | ||
− | [[ | + | [[Category:Functions]] |
*[[Common Organization of Controls Kit]] | *[[Common Organization of Controls Kit]] | ||
{{#set:Description=Creates new object.}} | {{#set:Description=Creates new object.}} |
Latest revision as of 19:18, 2 September 2013
Creates a new control object.
Function
Synopsis
control = cock.new ( id, data )
Arguments
string id
- Optional. An identifier to use for this object. Generated automatically if not provided.
table data
- Optional. Specifically formated setup data to build layouts from. Will not instantly create layout if not provided.
Returns
table control
- Newly created control object.
See also
- cock.delete
- cock.find
- Common Organization of Controls Kit Setup data
- Common Organization of Controls Kit Manual
- Common Organization of Controls Kit