Difference between revisions of "SHIP:Sail:set"

From Serious Documentation
Jump to: navigation, search
Line 9: Line 9:
 
*{{SailFunc|getChild}}, {{SailFunc|getChildIndex}}
 
*{{SailFunc|getChild}}, {{SailFunc|getChildIndex}}
 
== Prototype ==
 
== Prototype ==
<code>{{SailFunc|set}} {{DataType|Node}}.property, [[SHIP:Data_Types|DataType]] value, [[SHIP:Data_Types|DataType]] peer_value);</code>
+
<code>{{SailFunc|set}}({{DataType|Node}}.property, [[SHIP:Data_Types|DataType]] value, [[SHIP:Data_Types|DataType]] peer_value);</code>
  
 
== Parameters/Return Value ==
 
== Parameters/Return Value ==
Line 19: Line 19:
 
|.property||{{DataType|Node}}||Property to set
 
|.property||{{DataType|Node}}||Property to set
 
|-
 
|-
|value||[[SHIP:Data_Types|DataType]]||new property value
+
|value||[[SHIP:Data_Types|DataType]]||new property value for the chosen {{DataType|Node}}'s property
 
|-
 
|-
 
|peer_value||[[SHIP:Data_Types|DataType]]||new property value for peers
 
|peer_value||[[SHIP:Data_Types|DataType]]||new property value for peers
Line 29: Line 29:
  
 
== Detailed Description ==
 
== Detailed Description ==
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.
+
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;"  

Revision as of 16:36, 12 October 2016

Function Returns Introduced Description
set v5.1.0 Set a property value of a Node Badge SHIPv5.gif

See Also:

Prototype

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

Parameters/Return Value

Parameter Data Type Description
.property Node 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