2013-04-21, 13:17
Hi,
I have some strange behaviours with some conditional onclicks and I have no idea why some work and others not. For example this radio button is working fine:
However if I change it to this, it's not working anymore:
It can be solved by using substring instead of stringcompare but that doesn't explain why the first one works and the second doesn't. The next example is not working at all (also not with substring):
Does anyone have any clue why this isn't working as expected? Am I doing anything wrong?
Thanks.
I have some strange behaviours with some conditional onclicks and I have no idea why some work and others not. For example this radio button is working fine:
PHP Code:
<control type="radiobutton">
[...]
<onclick condition="!stringcompare(Skin.String(HomeWidget.1.Method),Random)">Skin.SetString(HomeWidget.1.Method,Random)</onclick>
<onclick condition="stringcompare(Skin.String(HomeWidget.1.Method),Random)">Skin.SetString(HomeWidget.1.Method,Last)</onclick>
<selected>stringcompare(Skin.String(HomeWidget.1.Method),Random)</selected>
</control>
However if I change it to this, it's not working anymore:
PHP Code:
<control type="radiobutton">
[...]
<onclick condition="!stringcompare(Skin.String(HomeWidget.1.Method),True)">Skin.SetString(HomeWidget.1.Method,True)</onclick>
<onclick condition="stringcompare(Skin.String(HomeWidget.1.Method),True)">Skin.SetString(HomeWidget.1.Method,False)</onclick>
<selected>stringcompare(Skin.String(HomeWidget.1.Method),True)</selected>
</control>
It can be solved by using substring instead of stringcompare but that doesn't explain why the first one works and the second doesn't. The next example is not working at all (also not with substring):
PHP Code:
<control type="radiobutton">
[...]
<onclick condition="stringcompare(Skin.String(HomeWidget.1.Method),Last)">Skin.SetString(HomeWidget.1.Method,Random)</onclick>
<onclick condition="stringcompare(Skin.String(HomeWidget.1.Method),Random)">Skin.SetString(HomeWidget.1.Method,Last)</onclick>
<selected>stringcompare(Skin.String(HomeWidget.1.Method),Random)</selected>
</control>
Does anyone have any clue why this isn't working as expected? Am I doing anything wrong?
Thanks.