$PARAM[...] seems not be filled in atribute condition="istrue?($PARAM[...])"
#1
$PARAM[...] works well if used with 
xml:
<visible>istrue?($PARAM[...])</visible>

$PARAM[...] seems not be filled in atribute condition
xml:
<include condition="istrue?($PARAM[...])">Def_Label_Test</include>

This code for illustrates what I mean :

xml:
    <variable name="RatingLabel">
        <value condition="Integer.IsGreater(Container($PARAM[controlid]).ListItem.Rating,0)">TEST</value>
        <value>$INFO[Container($PARAM[controlid]).ListItem.Rating]</value>
    </variable>


    <include name="Def_Label_Test">
        <control type="label">
            ...
            <label>$INFO[Container($PARAM[controlid]).ListItem.Rating]</label>
        </control>
    </include>
    
    <include name="Furniture_Info">
        <param name="controlid" value="$PARAM[controlid]"/>
        <definition>
            <control type="group">
                <visible>Control.HasFocus($PARAM[controlid])</visible>
                <control type="grouplist">

                    <!-- Test 1     -->
                    <control type="label">
                        ...
                        <label>$INFO[Container($PARAM[controlid]).ListItem.Rating]</label>
                        <visible>Integer.IsGreater(Container($PARAM[controlid]).ListItem.Rating,0)</visible>
                    </control>

                    <!-- Test 2     -->
                    <control type="label">
                        ...
                        <label>$VAR[RatingLabel]</label>
                    </control>

                    <!-- Test 3     -->                    
                    <include condition="Integer.IsGreater(Container($PARAM[controlid]).ListItem.Rating,0)">Def_Label_Test</include>                    
                    
                </control>
            </control>
        </definition>
    </include>
 
Test 1 : display rating value (eg: 6.6)

Test 2 : display default value without condition: (eg: 6.6)
=> should be "TEST"

Test 3 : display nothing
If I delete attribute condition rating value (eg: 6.6) is displayed

Of course I have read Wiki to find a answer without success

https://kodi.wiki/view/Skinning_Manual
https://kodi.wiki/view/List_of_boolean_conditions

So my only question is it is normal ? Smile

i hope i am understandable...
(Sorry for my english)

Thanks for any answers

EDIT : tested with Nexus 20.1 Windows X64
Reply
#2
This is because if you add 'condition' to an include, it is only evaluated when the window opens for the first time, so if your $PARAM is not yet populated at window open or if it changes, the include condition won't update conditionally. To have it work dynamically, you need to stick with the visible condition.

Also I'm not sure, do parameters work in variables? I don't think they do but not 100%
Reply
#3
(2023-03-29, 11:14)realcopacetic Wrote: Also I'm not sure, do parameters work in variables? I don't think they do but not 100%

They don't.

It's the primary reason my script.skinvariables addon exists - to help build variables for multiple containers and listitems without needing to remake each variable for each container/listitem manually.
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
#4
(2023-05-02, 10:50)jurialmunkey Wrote:
(2023-03-29, 11:14)realcopacetic Wrote: Also I'm not sure, do parameters work in variables? I don't think they do but not 100%

They don't.

It's the primary reason my script.skinvariables addon exists - to help build variables for multiple containers and listitems without needing to remake each variable for each container/listitem manually.

I can attest first-hand doing it manual isn't fun, especially for widgets that could have any combination of parameters. It's why I stopped at 9, too many variables and expressions to map out
Reply

Logout Mark Read Team Forum Stats Members Help
$PARAM[...] seems not be filled in atribute condition="istrue?($PARAM[...])"0