From wiki.ginstr.com
Jump to: navigation, search
(Example)
m (formatting)
Line 12: Line 12:
 
===Save to variable===
 
===Save to variable===
  
;<code>[gn:act_saveToVariable]|[target,source]</code>
+
:;<code>[gn:act_saveToVariable]|[target,source]</code>
  
{| class="wikitable sortable" style="font-size: 85%; text-align: left;"
+
:{| class="wikitable sortable" style="font-size: 85%; text-align: left;"
 
|-
 
|-
 
! scope="col" | Parameter
 
! scope="col" | Parameter
 
! scope="col" | Description
 
! scope="col" | Description
 
|-
 
|-
| [[target]]
+
| <code>[[target]]</code>
 
| [[target]] for which the value from [[source]] will be stored permanently
 
| [[target]] for which the value from [[source]] will be stored permanently
 
* Valid [[target|targets]]:
 
* Valid [[target|targets]]:
 
** [[Variables|variable]]
 
** [[Variables|variable]]
 
|-
 
|-
| [[source]]
+
| <code>[[source]]</code>
 
| [[source]] from where the value will be stored in [[target]]
 
| [[source]] from where the value will be stored in [[target]]
 
* Valid [[source|sources]]:
 
* Valid [[source|sources]]:
Line 32: Line 32:
  
 
====Example====
 
====Example====
<code>@variable/siteSelection</code> - variable<br>
+
:<code>@variable/siteSelection</code> - variable<br>
<code>@+id/site</code> - source<br><br>
+
:<code>@+id/site</code> - source<br>
<code>[gn:act_saveToVariable]|[@variable/siteSelection,@+id/site]</code>
+
:; ⤷ <code>[gn:act_saveToVariable]|[@variable/siteSelection,@+id/site]</code>
 
<hr>
 
<hr>

Revision as of 16:13, 12 July 2017

gn:act_saveToVariable

Description
Action used to store value of variable in variables.xml file from target.
Values that are stored in variables.xml are loaded into variables on startup of the ginstr application.
Action returns
void

Action signatures

Save to variable

[gn:act_saveToVariable]|[target,source]
Parameter Description
target target for which the value from source will be stored permanently
source source from where the value will be stored in target

Example

@variable/siteSelection - variable
@+id/site - source
[gn:act_saveToVariable]|[@variable/siteSelection,@+id/site]