Toggle menu
862
3.8K
30.2K
279.1K
Catglobe Wiki
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

AxisSet updateAxis: Difference between revisions

From Catglobe Wiki
jrfconvert import
 
Cg van (talk | contribs)
No edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Category:HelpBooks]]
{{HelpFiles}}



====AxisSet_updateAxis====
==== AxisSet_updateAxis ====


Updates the axis specified as argument to the method. If no axis exists in the axis-set with the axis name then return false without updating anything. Else the axis in the axis-set is updated with the state found in the axis array passed as argument overwriting the current axis in the axis-set and the function returns true.
Updates the axis specified as argument to the method. If no axis exists in the axis-set with the axis name then return false without updating anything. Else the axis in the axis-set is updated with the state found in the axis array passed as argument overwriting the current axis in the axis-set and the function returns true.  


'''Syntax'''
'''Syntax'''  


AxisSet_updateAxis(''axis'')
AxisSet_updateAxis(''axis'')  


'''Arguments'''
'''Arguments'''  


''axis'': Is an axis array, created by Axis_new function.
''axis'': Is an axis array, created by Axis_new function.  


'''Return type'''
'''Return type'''  


bool
bool  


'''Examples'''
'''Examples'''  


bool b = AxisSet_updateAxis(ageAxis);
''array axis = AxisSet_getAxis("Sex");''


'''Availability'''
''print(axis); ''


Version 5.5
''//Result: {0,Sex,Hvad er dit køn?,Sex,Sex != empty,False,{{1,Mand,Sex == [1],},{1,Kvinde,Sex == [2],}},}''
__NOTOC__
 
<!-- imported from file: 5235.htm-->
''Axis_addOption(axis, AxisOption_new("Ved ikke svar", "Sex == [3]"));''
 
''bool b = AxisSet_updateAxis(axis);''
 
''if (b) print("Axis was updated");''
 
''else print("Axis does not exist"); ''
 
''//Result: Axis was updated''
 
''print(axis);''
 
''//Result: {0,Sex,Hvad er dit køn?,Sex,Sex != empty,False,{{1,Mand,Sex == [1],},{1,Kvinde,Sex == [2],},{1,Ved ikke svar,Sex < 3,}},}''
 
'''Availability'''
 
Version 5.5 __NOTOC__ <!-- imported from file: 5235.htm-->  
 
[[Category:Axis_set_modifying_CGScript_functions]]

Latest revision as of 09:42, 23 December 2011



AxisSet_updateAxis

Updates the axis specified as argument to the method. If no axis exists in the axis-set with the axis name then return false without updating anything. Else the axis in the axis-set is updated with the state found in the axis array passed as argument overwriting the current axis in the axis-set and the function returns true.

Syntax

AxisSet_updateAxis(axis)

Arguments

axis: Is an axis array, created by Axis_new function.

Return type

bool

Examples

array axis = AxisSet_getAxis("Sex");

print(axis);

//Result: {0,Sex,Hvad er dit køn?,Sex,Sex != empty,False,{{1,Mand,Sex == [1],},{1,Kvinde,Sex == [2],}},}

Axis_addOption(axis, AxisOption_new("Ved ikke svar", "Sex == [3]"));

bool b = AxisSet_updateAxis(axis);

if (b) print("Axis was updated");

else print("Axis does not exist");

//Result: Axis was updated

print(axis);

//Result: {0,Sex,Hvad er dit køn?,Sex,Sex != empty,False,{{1,Mand,Sex == [1],},{1,Kvinde,Sex == [2],},{1,Ved ikke svar,Sex < 3,}},}

Availability

Version 5.5