2006-02-02, 05:43
i have multiple classes in my latest py. i pass data from one class to another, create a control and open a window.
i want to exit that window (close it) and then go back to the previous one. having issues... it crashes on me.
here's my code for my 2nd class (main_screen is class that sends data to imagewin)...
class imagewin(xbmcgui.window):
def (self,img_screen):
if emulating: xbmcgui.window.(self)
res = self.getresolution()
self.scalex = ( float(self.getwidth()) / float(720) )
self.scaley = ( float(self.getheight()) / float(480) )
self.setcoordinateresolution(res)
self.img = self.addcontrol(xbmcgui.controlimage(0,0,720,480, img_screen))
def onaction(self, action):
if action == action_previous_menu or action == action_parent_dir:
self.removecontrol(self.img)
self.main_screen()
thanks!
i want to exit that window (close it) and then go back to the previous one. having issues... it crashes on me.
here's my code for my 2nd class (main_screen is class that sends data to imagewin)...
class imagewin(xbmcgui.window):
def (self,img_screen):
if emulating: xbmcgui.window.(self)
res = self.getresolution()
self.scalex = ( float(self.getwidth()) / float(720) )
self.scaley = ( float(self.getheight()) / float(480) )
self.setcoordinateresolution(res)
self.img = self.addcontrol(xbmcgui.controlimage(0,0,720,480, img_screen))
def onaction(self, action):
if action == action_previous_menu or action == action_parent_dir:
self.removecontrol(self.img)
self.main_screen()
thanks!