Kodi Community Forum
WindowXML GUI Toolkit (replaces GUIBuilder for XBMC python scripts for GUI coding) - 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: WindowXML GUI Toolkit (replaces GUIBuilder for XBMC python scripts for GUI coding) (/showthread.php?tid=24839)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13


- Nuka1195 - 2007-05-18

mrz, no that was for Donno


Edit: but about the conflicting controls, can you add some dummy ones in the xml file, with the id you want, then just position and size them as you need them. I do think if there is a way to fix that it should be fixed. In the mean time maybe that will help.


- mrz - 2007-05-18

I could but its a bit tricky. I'm using buttons to show a program calendar and I never know how many programs there will be. I'm currently using the add/delete procedure mentioned above. It works and does not affect anything else (as far as I have noticed).

Another question: <animation .... condition=!Control.HasFocus(90)>Conditional</animation>
It looks as if the condition is true only AFTER control 90 has been focused. Is this right?

Sorry if Im a pain in the ...


- mrz - 2007-05-18

Nuka1195, actually, thinking about it, I could add them in the XML as invisible. I guess empty labels consumes least memory.


- mrz - 2007-05-19

Did not work :-(


- Nuka1195 - 2007-05-19

You can't set them <visible>false</false> in the xml, you won't be able to set them visible. So either set them invisible in onInit() or if you can use a visible condition.


- mrz - 2007-05-19

Yap, absolutely.
I thought I could block the IDs by keeping em invisible but unfortunately it looks as if self.addControl() also collides with the IDs used in the XML.


- matthuisman - 2007-05-23

Well done on the sticky!


- Nuka1195 - 2007-05-24

Any word on fixing the ControlGroup control?

It needs at a minimum a getControl() and addControl() method.

Oh and not freezing XBMC when you actually use the control Smile


- Nuka1195 - 2007-05-25

I guess the rule of maintaining a feature you introduce, does not apply anymore.


- Gamester17 - 2007-05-25

is the WindowXML GUI toolkit documented in the XBMC wiki online-manual (should maybe have it's own article?)?

Eek


- donno - 2007-05-27

@nuka
This rule about maintaining stuff sounds new then, me points at kai Smile
and its open source so you can fix it if you like.

If you comment is aimed at the Control Group. The only part of that I coded was to get it to at least compile. Sure I introduce it by committing but it’s not like it affects end users, it only affects those python developers trying to use it. I can revert the change if you want, else please feel free to complete it. I was sure at the time nano had it all working, but I guess not.

@Gamester17
Currently it isn't documented. Do you want me to create a new page and add some information about


WIKI article needed... - Gamester17 - 2007-05-27

donno Wrote:@Gamester17
Currently it isn't documented. Do you want me to create a new page and add some information about
Yes please, (will the article be called "WindowXML GUI Toolkit", or just "WindowXML"?) , thank you in advance


WindowXML Update - donno - 2007-06-03

Gamester17: its called WindowXML. its not quite fully documetented but its a start.

Good news Smile thanks to a recent change to WindowXML by Nuka, getListItem now is fully functional.

You can now use teh set methods on it as it actually points to the real one not a dupe one with same info.


curItem = self.getListItem(self.getCurrentListPosition())
print curItem.getLabel()
curItem.setLabel("Test2")
print curItem.getLabel()
Should work now.



Just tested <visible>false</false> in the xml, and it works fine. did it on a label and a list.

mtz: self.getFocus() actually does the requivlent to self.getControl(self.getFocusId())) which will resuly in the unknown control, as the getControl can only convert controsl that has a python equvilent. Plan to make the getControl return a generic control at some stage. In WindowXML probley best to use getFocusID and do most things based on the id rather then the control object.


- Nuka1195 - 2007-06-05

I didn't fix getListItem()?

Your changes though work much better than the way I had it, good job.

About the getListSize(). Wouldn't it be better to keep the methods the same between regular lists and WindowXML lists?

This way you don't have to code specially for WindowXML.


- Basje - 2007-06-05

Hi there,

I am making a script (Uitzendinggemist.v2) which uses WindowXML for windows, too make skinning possible.

But I run into a EXCEPTION ERROR that complete freezes my XBMC. It doesn't happen that every time. Much more on XBMC than XBMC_PC (Which makes it hard to debug). When it occurs, it is in this part of the script:
Code:
print("Processing Items into List")
for m in self.episodelistItems:
    print ("item: ")
    tmp = xbmcgui.ListItem(m.name, "", m.icon, m.icon)
    print m.name
    print m.icon
    self.addItem(tmp)

the m.name and m.icon are both strings. The logfile reads this:

Code:
CThread::staticThread : Access violation at 0x00535f0a: Reading location 0x036c70b4

I run the T3CH R9113. More info on the script is in my sign. The code is from the chn_rtl.py in the Channels folder of the script.