2016-03-02, 22:40
Hi,
I've tried to set a Window Property with the value of a boolean setting, so true or false is stored in this Property.
A recheck by adding a label to the screen containing the getSetting() value and also a debug output shows that
the value is exact "true" or "false" depending on the setting.
But if I try StringCompare as a result filling the Property direct in a visible tag does not work, dosen't work eigher.
Can anyone point me to the coding/skinning error?
Here are a few snippets:
settings.xml:
A peace of code using it to set the Window Property:
I have tried with (StringCompare):
and direct Prop
Why this does not work?
I added debug output which shows me that StringCompare tests if "true" == "true"
but the button is always hidden ...
Is there a problem with the words "true" and "false" ?
If I use SubString() it works, but why not with StingCompare() ?
regards tdoe
I've tried to set a Window Property with the value of a boolean setting, so true or false is stored in this Property.
A recheck by adding a label to the screen containing the getSetting() value and also a debug output shows that
the value is exact "true" or "false" depending on the setting.
But if I try StringCompare as a result filling the Property direct in a visible tag does not work, dosen't work eigher.
Can anyone point me to the coding/skinning error?
Here are a few snippets:
settings.xml:
Code:
<setting id="show_something" type="bool" label="Show the Label" default="true"/>
A peace of code using it to set the Window Property:
Code:
addon = xbmcaddon.Addon()
WINDOW = xbmcgui.Window( 10000 )
show_something = str(addon.getSetting('show_something'))
WINDOW.setProperty("MyTest.Visible", show_something)
I have tried with (StringCompare):
Code:
<control type="button" id="50101">
<include>ButtonHomeSubCommonValues</include>
<label>TestButton</label>
<visible>StringCompare(Window(Home).Property(MyTest.Visible), true)</visible>
<onclick>RunScript(run.plugin.test,"?methode=show")</onclick>
</control>
and direct Prop
Code:
<control type="button" id="50101">
<include>ButtonHomeSubCommonValues</include>
<label>TestButton</label>
<visible>Window(Home).Property(MyTest.Visible)</visible>
<onclick>RunScript(run.plugin.test,"?methode=show")</onclick>
</control>
Why this does not work?
I added debug output which shows me that StringCompare tests if "true" == "true"
but the button is always hidden ...
Is there a problem with the words "true" and "false" ?
If I use SubString() it works, but why not with StingCompare() ?
regards tdoe