2010-10-27, 15:45
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
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