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 (Arguments)
Line 4: Line 4:
 
<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 [[cock.setupdata|setup data]] to build layouts from.}}
+
{{param|table|data|Optional. Specifically formated [[cock.setupdata|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}}

Revision as of 18:32, 31 August 2013

Creates a new control object.

Synopsis

Function

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