2011-01-28, 12:49
Hi,
I am trying to create a simple window addon using this tutorial.
The problem is that instead of having any sort of window i get a black screen with a progress popup indicating "Loading directory 0 elements".
Whenever I try to define an onAction method, the debug log shows that the script throws an exception in Window.onAction (making it impossible to close)
For info here is my test code:
And here is the result:
I guess the xmlgui library has changed since this tutorial was made.
It would help me alot of someone could provide / point me at a simple example of opening a smple window addon that can be closed.
Many thanks
I am trying to create a simple window addon using this tutorial.
The problem is that instead of having any sort of window i get a black screen with a progress popup indicating "Loading directory 0 elements".
Whenever I try to define an onAction method, the debug log shows that the script throws an exception in Window.onAction (making it impossible to close)
For info here is my test code:
Code:
import sys
import xbmc, xbmcgui, xbmcplugin
#get actioncodes from keymap.xml
ACTION_PREVIOUS_MENU = 10
class MyClass(xbmcgui.Window):
def onAction(self, action):
if action == ACTION_PREVIOUS_MENU:
self.close()
mydisplay = MyClass()
mydisplay.doModal()
del mydisplay
And here is the result:
I guess the xmlgui library has changed since this tutorial was made.
It would help me alot of someone could provide / point me at a simple example of opening a smple window addon that can be closed.
Many thanks