It's impossible to shutdown from skin
#1
hi all
pls help me find out a solution of the next problem:
in the my skin (on the mediastream basis) in the startup.xml window i try to load my own window xml handler which runs the standart home.xml window as shown below:

Startup.xml
[HTML]
<window>
<defaultcontrol always="true">10</defaultcontrol>
<allowoverlay>no</allowoverlay>
<controls>
<control type="button" id="10">
<description>Trigger</description>
<onfocus>XBMC.RunScript(U:\skin\\TestSkin\extras\Test Scripts\start_script\default.py)</onfocus>
<texturenofocus>-</texturenofocus>
<texturefocus>-</texturefocus>
</control>
</controls>
</window>[/HTML]

my script:
Code:
constants.BASE_SKIN_PATH = xbmc.translatePath(constants.BASE_SKIN_PATH)
    global home_window
    home_window = home.Windows_Home("TestHome.xml", constants.BASE_SKIN_PATH, "Default")
    home_window.doModal()
    
    
    del home_window

and my own windows handler:

Code:
import sys
import os

from constants import constants
import xbmc, xbmcplugin, xbmcgui

class Windows_Home(xbmcgui.WindowXML):
    """
    home window XML handler class
    """

    content_db_database_checked = False
    
    def onInit(self):
        print "initialization home window"
        
    def onClick(self, controlID):
        """
        onClick(self, controlID) is the replacement for onControl. It gives an interger.
        This function has been implemented and works
        """
    print "onclick(): control %i" % controlID
    
    def onAction(self, action):
    """
    onAction(...)
    onAction(self, Action action) -- onAction method.
    
    This method will recieve all actions that the main program will send
    to this window.
    By default, only the PREVIOUS_MENU action is handled.
    Overwrite this method to let your script handle all actions.
    Don't forget to capture ACTION_PREVIOUS_MENU, else the user can't close this window.
    """
    
    if action in constants.action_codes.ACTION_CANCEL_DIALOG or \
       action in constants.action_codes.ACTION_EXIT_SCRIPT:
        self.close()
        
        #check content db data
    print "Action : " + str(action.getId())
    
    def onFocus(self, controlID):
        """"
        onFocus(self, int controlID)
        This function has been implemented and works
        """
        print "onFocus(): control %i" % controlID

the problem is when i try to shutdown the xbmc it's doing nothing and now shutdowning Sad

the logs are in the http://pastebin.com/m5db4376e

the problem as can i see is in the next messages:
Code:
12:42:15 T:1516 M:1070465024  NOTICE: clean cached files!
12:42:15 T:1516 M:1070456832  NOTICE: unload skin
12:42:15 T:1516 M:1084973056   ERROR: CLocalizeStrings::ClearBlock: Trying to clear non existent block D:\Vyzo\XBMC81\skin\TestSkin\
12:42:15 T:1516 M:1085935616   ERROR: CLocalizeStrings::ClearBlock: Trying to clear non existent block D:\Vyzo\XBMC81\skin\TestSkin\
12:42:15 T:1516 M:1090588672  NOTICE: stop python

ps: i don't know how can i attach the file within post
Reply

Logout Mark Read Team Forum Stats Members Help
It's impossible to shutdown from skin0