The new types of infolabels don't return right values.
#1
If I use the infolabel Addon.SettingStr and Addon.SettingInt in the comparison boolean functions, everything is fine. The function returns the expected results corresponding to the values stored in the settings.

But if I use the Addon.SettingStr infolabel in $INFO[...] for example <label>$INFO[Addon.SettingStr(...)]<!label>, I still get an empty string.

So I have two questions:
  1. Is there any restriction for these infolabels to be used in $INFO[...] or is this behavior a bug?
  2. So if there is a limitation and I cannot use these infolabels in $INFO[...], my question is why? It is a big disadvantage for otherwise very useful infolabels. The possibility of using it, for example, in a context menu addon would fundamentally increase the attractiveness and the possibility of creating a very simple and universal context menu, které by mohli uživatelé parametrovat pomocí nastavení v addon.
Reply
#2
From looking at the 21405 (PR) it looks like the intended use case was only in boolean expressions.

scott s.
.
Reply
#3
Yes, I got that impression too. That's why I wanted to confirm it and, above all, to ask: "Why is it like that?" And if it's not a pity that it is so.

I wanted to use a custom context menu item in my script using this code:

xml:
<item library="resources/lib/command.py" args="$INFO[Addon.SettingStr(script.contextmenu,item1_command)]" >
    <label>$INFO[Addon.SettingStr(script.contextmenu,item1_name)]</label>
    <visible>Addon.SettingBool(script.contextmenu,item1_enable) + Integer.IsEqual(Addon.SettingInt(script.contextmenu,item1_position),4)</visible>
</item>

So, as I can see, it simply won't work and I'll have to solve it in a different, slightly more difficult way...

Anyway, thanks for the reply, Scott.
Reply

Logout Mark Read Team Forum Stats Members Help
The new types of infolabels don't return right values.0