pointers needed WindowXML class - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26) +--- Thread: pointers needed WindowXML class (/showthread.php?tid=197589) |
pointers needed WindowXML class - canucks - 2014-06-11 Hi, I've decided to use the WindowXML along with a default skin for the addon to make pagination work and it is working out well so far. As I build up my addon UI via the xml file, I again run into an issue with dynamic content. Below is the layout I want to make. Code: -------------------------------------
The problem is at step 4, as I have yet to figure out a way to add it programmatically from the Python code. For this row, I define it as a groupList, which then expects other controls to be added to it and I intend to add control lable. However, upon retrieving the groupList, I get an error saying that I am trying to retrieve an unsupported control. From further research into this problem, I found that when rendering xml file into a ui, it is turned into a c++ code ui, which I am then using python to try and modify, which is a no no. Then I figure, what if I just create a normal list item container, much like the 'poster' section and instead of pretty poster, just display text. Sounds, like a good plan (I think) but then in the onClick method, how do I determine what was clicked? or perhaps have the listitem somehow call back to my python code to construct the rest call (how would I do this)? Or simply be done with the xml file and render the whole UI from python? any tips and/or suggestions greatly appreciated! RE: pointers needed WindowXML class - jmarshall - 2014-06-12 For your list thing you should be able to call getSelectedItem() to determine which item was clicked I think? |