2015-08-02, 00:45
so I have a plugin and I want to introduce a window dialog to it. this is my class inheriting from WindowXMLDialog:
and my code that calls the class:
I get the log in my log file, but after the close my Kodi crashes without any log traces.
I don't even get to the next dialog.
An help please would be greatly appreciated.
Code:
class MyCvv(xbmcgui.WindowXMLDialog):
def show(self):
self.doModal()
def __log(self, text):
import datetime
print datetime.datetime.now(), 'LOGGER: %s' % text
def __init__(self, *args, **kwargs):
xbmc.executebuiltin('Skin.Reset(AnimeWindowXMLDialogClose)')
xbmc.executebuiltin('Skin.SetBool(AnimeWindowXMLDialogClose)')
self.name = ''
self.sec_cvv = ''
self.__log('CVV Initialized')
def onClick(self, controlID):
if controlID == 7:
self.name = self.getControl(8).getText().replace(' ','%20')
self.sec_cvv = self.getControl(22).getText()
self.__log('CC Data => Name: %s' %self.name)
dialog = xbmcgui.Dialog()
dialog.ok('CVV', '','Complete.', '')
xbmc.executebuiltin('Skin.Reset(AnimeWindowXMLDialogClose)')
self.close()
and my code that calls the class:
Code:
cvv = MyCvv('cvv.xml',__settings__.getAddonInfo('path'),'Default')
cvv.show()
del cvv
dialog = xbmcgui.Dialog()
dialog.ok('CVV', '','Next?.', '')
I get the
Code:
Complete
I don't even get to the next dialog.
An help please would be greatly appreciated.