You are not logged in.

1

Friday, November 2nd 2012, 5:09pm

Not a Number error - conversion from string to number?

i have this situation

set(var1, 5);

and then in action this

if (var1 != null, set(view.hlookat, var1));

Problem is that in debugging mode tracing hlookat says that its NaN??? How can i make my var1 a number?

regards

2

Friday, November 2nd 2012, 6:25pm

Hi,

by calling:

Source code

1
set(view.hlookat, var1)
you will set the 'view.hlookat' variable to the text 'var1', and because the view.hlookat variable is a Number variable the result will be NaN.

To set to view.hlookat to the content of 'var1', either call:

Source code

1
set(view.hlookat, get(var1))
or

Source code

1
copy(view.hlookat, var1)


Best regards,
Klaus

3

Friday, November 2nd 2012, 9:30pm

oh, cant believe what i've missed...it works now, thank you again!