2014-06-11, 02:24
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.
Here's how I wanted it to work.
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!
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:
-------------------------------------
| Live TV | Movies | TV Shows | VOD |
-------------------------------------
| Genre.... |
-------------------------------------
| |
| poster |
| |
| |
-------------------------------------
- Select from the top row
- Python onClick event takes place, determine which control was press, for example 'Movies'
- Build REST request to retrieve the Genre/sub-category for Movies
- For each item returned, add it to the 2nd row
- Select an item from the 2nd row
- Python onClick determine the next REST call out to retrieve the Movies listing
- Populate the 'poster' area
- Select movie and enjoy
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!