Dynamic Include Parameters
#1
Hi together,

let's take the following example:


<include name="testinclude">
    <param name="top" />
    <definition>
        <control type="label">
            <top>$PARAM[top]</top>
            ....
        </control>
    </definition>
</include>

Call of this include somewhere in a skin xml file:


<include content="testinclude">
    <param name="top">300</param>
</include>

This example works as expected. But what i need and want to do is to use a dynamic value for the "top" parameter, for example a Window Property (set by a python script). So if i try to call the include in the following way:


<include content="testinclude">
    <param name="top">$INFO[Window.Property(top)]</param>
</include>

the example does not work. The parameter is passed as string "$INFO[Window.Property(top)]" and not as the value of the info label.

When i use $PARAM[top] in the <label> tag of an label control, then it works correct again, but only because there info labels are resolved. In <left>, <top> ... and almost any other tag info labels are not resolved. But i need to be able to use those kind of "dynamic parameters" in any arbitrary tag...

Has anybody an idea how to solve this? Or is this not possible at all? Huh

Cheers Louis
Reply
#2
Nobody? Is it not possible at all?
Reply
#3
I don't think that's possible because of the order in which things are parsed by the skinning engine.  When the param is evaluated, I don't think the INFO has been, so that whole thing is just a string.  You might see if you can do what you're trying to do with variables instead.

https://kodi.wiki/view/Skinning_Manual#Variables
Reply



Logout Mark Read Team Forum Stats Members Help
Dynamic Include Parameters0
This forum uses Lukasz Tkacz MyBB addons.