Question about WindowXMLDialog
#1
Hi,

I was trying to write a script and I have one window which in turn creates a WindowXMLDialog based on a XML definition heavily based on DialogProgress.xml which comes with the Confluence skin. After creating a class for it:

class MyDialog (xmbcgui.WindowXMLDialog):
[...]

I create the window but I cannot use getControl(Id) to get a control based on its Id *before* calling .show(). It always throw out an exception mentioning that the control doesn't exist. After calling .show(), then getControl works ok...weird...also, I cannot close the dialog inside the MyDialog class. The MyDialog XML definition has a button and in the onClick() function I process the click on that button. I simply want to close the dialog at that time, but calling self.close() doesn't work...

Any idea?

Thanks
Reply
#2
Just an update: I am now able to close the DialogWindow if I run .doModal() before. But I need to run .show() always before that.
Reply
#3
This is covered in the tutorials on the wiki Oo
Reply
#4
Sorry, can you post the link to it?

Thanks
Reply
#5
http://lmgtfy.com/?q=how+to+write+scripts+for+xbmc
Reply
#6
why do you need that, dialog progress is already handle by script
Reply

Logout Mark Read Team Forum Stats Members Help
Question about WindowXMLDialog0