pointers needed WindowXML class
#1
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:
-------------------------------------
| Live TV | Movies | TV Shows | VOD |
-------------------------------------
| Genre....                         |
-------------------------------------
|                                   |
|             poster                |                                                
|                                   |
|                                   |
-------------------------------------
Here's how I wanted it to work.
  1. Select from the top row
  2. Python onClick event takes place, determine which control was press, for example 'Movies'
  3. Build REST request to retrieve the Genre/sub-category for Movies
  4. For each item returned, add it to the 2nd row
  5. Select an item from the 2nd row
  6. Python onClick determine the next REST call out to retrieve the Movies listing
  7. Populate the 'poster' area
  8. 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!
Reply
#2
For your list thing you should be able to call getSelectedItem() to determine which item was clicked I think?
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply

Logout Mark Read Team Forum Stats Members Help
pointers needed WindowXML class0