2011-07-15, 23:58
Notice part:
Some time ago Jonathan added new unified "back" action - ACTION_NAV_BACK (id = 92). If You are developing eden-pre addons - add it to onAction handling to close Your windows/dialogs.
Idea part:
I'd like to add failsafe mechanism that if script doesn't handle actions that should exit script (ACTION_NAV_BACK = 92 and ACTION_PREVIOUS_MENU = 10) - xbmc will do it (so user won't stuck in script he can't quit). This would require You (script's maintainer) to add "return True" to Your onAction callbacks to indicate that You handled action. This way You can still override "back" action to not close window/dialog:
Feedback please?
Some time ago Jonathan added new unified "back" action - ACTION_NAV_BACK (id = 92). If You are developing eden-pre addons - add it to onAction handling to close Your windows/dialogs.
Idea part:
I'd like to add failsafe mechanism that if script doesn't handle actions that should exit script (ACTION_NAV_BACK = 92 and ACTION_PREVIOUS_MENU = 10) - xbmc will do it (so user won't stuck in script he can't quit). This would require You (script's maintainer) to add "return True" to Your onAction callbacks to indicate that You handled action. This way You can still override "back" action to not close window/dialog:
Code:
def onAction( self, action ):
if ( action.getId() == 92):
if ( self.weWantToOverride() ): #we want leave some inner menu for example
self.doSomethingElseThanClosingWindow()
return True