How can I set numeric skin variable?
#1
Lightbulb 
How can I set numeric skin variable?
Skin.SetNumeric(test,207) for ex. does not work.
And how can we read it back because there is no Skin.Numeric().
tried to achieve in this way:
PHP Code:
<control type="button">
            <
label>$LOCALIZE[test]</label>
            <
onclick>Skin.SetNumeric(test,207)</onclick>            
</
control

but no help.

Thanks
Reply
#2
Try Skin.String(...).
Image
Reply
#3
That is not working under $LOCALIZE:
PHP Code:
<control type="button">
            <
label>$LOCALIZE[Skin.String(test)]</label>
            <
onclick>Skin.SetNumeric(test,207)</onclick>            
</
control

perhaps because $LOCALIZE expects integer but here it is string
Reply
#4
(2012-10-17, 13:35)slinuxgeek Wrote: perhaps because $LOCALIZE expects integer but here it is string

Exactly. So you have to find another way until integer variables are supported.

Image
Reply
#5
There is Skin.SetNumeric( ) but not the Skin.Numeric( ) for reading that back, also Skin.SetNumeric( ) is not correctly defined as it always opens numeric dialog.

can we convert a string to numeric in skin?
Reply
#6
Skin.SetNumeric(...) is the same as Skin.SetString(...). Only difference is that it opens the numeric dialog instead of the keyboard.
Image
Reply
#7
no no, Skin.SetNumeric(...) always opens numeric dialog even if we pass the 2nd argument which is not the case with Skin.SetString(...)
Reply
#8
Still it sets only a string, no integer value and you can get the value with Skin.String(...).
Image
Reply

Logout Mark Read Team Forum Stats Members Help
How can I set numeric skin variable?0