Difference between revisions of "SHIP:Sail:set"

From Serious Documentation
Jump to: navigation, search
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 
{{SailFuncTableStart|}}<onlyinclude>
 
{{SailFuncTableStart|}}<onlyinclude>
|{{SailFunc|set}}||{{DataType|Node}} srcNode||style="text-align:center;"|v5.1.0||Set a property {{v5}}</onlyinclude>
+
|{{SailFunc|set}}||||style="text-align:center;"|v5.1.0||Set a property value of a {{DataType|Node}} and its peers</onlyinclude>
 
|}
 
|}
 
== See Also: ==
 
== See Also: ==
Line 9: Line 9:
 
*{{SailFunc|getChild}}, {{SailFunc|getChildIndex}}
 
*{{SailFunc|getChild}}, {{SailFunc|getChildIndex}}
 
== Prototype ==
 
== Prototype ==
<code>{{SailFunc|set}} {{DataType|Node}} node_prop, {{DataType|Integer}}/{{DataType|String}}/{{DataType|Boolean}} value, {{DataType|Integer}}/{{DataType|String}}/{{DataType|Boolean}} peers_value);</code>
+
<code>{{SailFunc|set}}({{DataType|Node}}.[[SHIP:Data_Types|DataType]] property, [[SHIP:Data_Types|DataType]] value, [[SHIP:Data_Types|DataType]] peer_value);</code>
  
 
== Parameters/Return Value ==
 
== Parameters/Return Value ==
Line 17: Line 17:
 
! scope="col" style="text-align:left" | Description
 
! scope="col" style="text-align:left" | Description
 
|-
 
|-
|node_prop||{{DataType|Node}}||Property to set
+
|property||{{DataType|Node}}.[[SHIP:Data_Types|DataType]]||Property to set
 
|-
 
|-
|value||{{DataType|Integer}}/{{DataType|String}}/{{DataType|Boolean}}||new property value
+
|value||[[SHIP:Data_Types|DataType]]||new property value for the chosen {{DataType|Node}}'s property
 
|-
 
|-
|peers_value||{{DataType|Integer}}/{{DataType|String}}/{{DataType|Boolean}}||new property value for peers
+
|peer_value||[[SHIP:Data_Types|DataType]]||new property value for peers
 
|-
 
|-
 
! scope="col" style="text-align:left" | Return
 
! scope="col" style="text-align:left" | Return
Line 29: Line 29:
  
 
== Detailed Description ==
 
== Detailed Description ==
This function sets the property to the value indicated and sets the property of the nodes peers to the indicated peers_value.
+
This function sets the property of a {{DataType|Node}} to the value indicated and sets the property of the nodes peers to the indicated peers_value.  The value should be of the same [[SHIP:Data_Types|DataType]] as the chosen property.
 
== Examples ==
 
== Examples ==
 
{| class="wikitable" style="margin: 1em 1em;"  
 
{| class="wikitable" style="margin: 1em 1em;"  
Line 37: Line 37:
 
|-
 
|-
 
|<code>{{SailFunc|set}}(pHome.visible, true, false);</code> ||||Set home page to visible and all other pages to non-visible
 
|<code>{{SailFunc|set}}(pHome.visible, true, false);</code> ||||Set home page to visible and all other pages to non-visible
 +
|-
 +
|<code>{{SailFunc|set}}(txEg1.textsize, 32, 20);</code>||||Set the property textsize of txEg1 to 32, and of all other peers to 20
 
|}
 
|}
  
 
[[Category:Node Functions]]
 
[[Category:Node Functions]]

Latest revision as of 11:57, 14 October 2016

Function Returns Introduced Description
set v5.1.0 Set a property value of a Node and its peers

See Also:

Prototype

set(Node.DataType property, DataType value, DataType peer_value);

Parameters/Return Value

Parameter Data Type Description
property Node.DataType Property to set
value DataType new property value for the chosen Node's property
peer_value DataType new property value for peers
Return no return value

Detailed Description

This function sets the property of a Node to the value indicated and sets the property of the nodes peers to the indicated peers_value. The value should be of the same DataType as the chosen property.

Examples

Example Results Notes
set(pHome.visible, true, false); Set home page to visible and all other pages to non-visible
set(txEg1.textsize, 32, 20); Set the property textsize of txEg1 to 32, and of all other peers to 20