My English is very bad to forgive for expressing myself badly
I am setting the confluence widget from xml with this code
xml:
<content sortby="lastused" sortorder="descending" target="addons" type="xml" limit="20">plugin://plugin.audio.radio_de</content>
but when loading the widget with
xml:
<onclick>RunAddon($INFO[Container(ID).ListItem.Property(Addon.ID)])</onclick>
does nothing
I tested with this code
xml:
<onclick>PlayMedia($INFO[Container(ID).ListItem.FilenameAndPath])</onclick>
if it worked to reproduce but not to open the addon some idea of what is my error
If i try to open radio from a widget written in xml
XML:
<control type="group">
<left>190</left>
<top>92</top>
<visible>!Skin.HasSetting(HomepageHideWidgetRadios) + Container(9000).Hasfocus(108) </visible>
<animation effect="fade" start="0" end="100" time="300" delay="350">Visible</animation>
<control type="group">
<control type="label">
<description>Title label</description>
<left>-118</left>
<top>40</top>
<width>110</width>
<height>100</height>
<label></label>
<align>right</align>
<aligny>top</aligny>
<font>Regular18</font>
<textcolor>white</textcolor>
<shadowcolor>black</shadowcolor>
<wrapmultiline>true</wrapmultiline>
</control>
<control type="panel" id="8004">
<left>0</left>
<top>0</top>
<width>912</width>
<height>176</height>
<onleft>8004</onleft>
<onright>8004</onright>
<onup>600</onup>
<ondown>9000</ondown>
<scrolltime>200</scrolltime>
<orientation>Horizontal</orientation>
<include>RadiosLayout1</include>
<include content="radioNormal" />
<onclick>RunAddon($INFO[Container(ID).ListItem.Property(Addon.ID)])</onclick>
</control>
</control>
</control>
does $INFO[Container(ID).ListItem.Property(Addon.ID)] return anything if you use it in a label control?
also, check if there's anything in the
Debug Log that might provide a clue.
Returns nothing, Debug Log, or anything, does nothing when pressed
ok, well there's you answer :-)
you're trying to use a listitem property that doesn't exist.
So how could I launch the addon from the widget using RunAddon if there is some way
well, you could hardcode the addon id.
..but what's the reason you want to override <onclick> ?
I don't want to override the <onclick>.
I think I explained badly I would like to launch the addon from onclick
adding an <onclick> tag to the container like you are doing:
xml:
<onclick>RunAddon($INFO[Container(ID).ListItem.Property(Addon.ID)])</onclick>
will override the default onclick behaviour that has been set for each listitem.
also see:
https://kodi.wiki/view/Dynamic_List_Cont...ick_action
So how should I put why I think that <onclick> is not if I put this code if it works
xml:
<onclick>PlayMedia($INFO[Container(ID).ListItem.FilenameAndPath])</onclick>
well hardcoding the addon id will work
xml:
<onclick>RunAddon(plugin.audio.radio_de)</onclick>
another thing that *might* work is:
xml:
<onclick>ActivateWindow(music, $INFO[Container(ID).ListItem.Path])</onclick>
Thank you very much it is already solved
xml:
ActivateWindow(music,$INFO[Container(ID).ListItem.FilenameAndPath])