2008-11-25, 10:35
Hi!
I hope, this doesn't get too confusing:
Two Problems. The first:
I call WindowXML windows by using RunScript. Inside this window I call another window the same way.
From inside this window I am not able anymore to use RunScript from the script to call other windows. Using RunScript from the xml-file works.
And, not calling a script of mine but any other script (like TAC.TV) works.
Calling the same (my) script already from the home window works. It just doesn't when being called from somewhere "inside".
Second Problem:
Imagine the following menu structure:
As you can see, vodOverview is re-used for the category listings. That means, the window is not called again when entering a subcategory, but the list control is removed, new data is fetched and then the list is being filled with the new data.
Usually, I can go back to the previous window by pushing either MENU or BACK on the remote control. This stops working as soon as I'm inside eg the movies category. Instead, I get a log entry for every push of the MENU or BACK button.
Clicking on a subcategory works and (as you can see below) gets me back to the home window.
This is my onClick code:
Could it be that something like a stack overflow occurs when calling runscript too often?
Do I explicitly have to do some close or unload stuff to prevent this misbehaviour?
btw: on the bottom of every script i have the following code (of course the xml names change)
Maybe someone can tell me a link to a good WindowXML example.. It seems to me that all the skins and scripts which are already available do not make much use of that WindowXML stuff yet.
I have found out by googling that this FrameMove exception seems to be an error which has been tried to being solved many times but has not been reproducable until now...
I guess, I have been able to reproduce this.
I hope, this doesn't get too confusing:
Two Problems. The first:
I call WindowXML windows by using RunScript. Inside this window I call another window the same way.
From inside this window I am not able anymore to use RunScript from the script to call other windows. Using RunScript from the xml-file works.
And, not calling a script of mine but any other script (like TAC.TV) works.
Calling the same (my) script already from the home window works. It just doesn't when being called from somewhere "inside".
Second Problem:
Imagine the following menu structure:
Code:
MainMenu (portal.py and Portal.xml)
- Vod Overview (vodOverview.py and VodOverview.xml)
-- Top Movies & Series (vodSubCategories.py and VodSubCategories.xml)
--- Movies (vodSubCategories.py and VodSubCategories.xml)
---- New (contains movies)
---- Action (contains movies)
---- Comedy (contains movies)
---- ... (contains movies)
--- Children (vodSubCategories.py and VodSubCategories.xml)
---- ... (contains movies)
--- Erotic (vodSubCategories.py and VodSubCategories.xml)
---- ... (contains movies)
-- Best of TV (vodSubCategories.py and VodSubCategories.xml)
--- ... (vodSubCategories.py and VodSubCategories.xml)
---- ... (contains movies)
Usually, I can go back to the previous window by pushing either MENU or BACK on the remote control. This stops working as soon as I'm inside eg the movies category. Instead, I get a
Code:
exception in CApplication::FrameMove()
Clicking on a subcategory works and (as you can see below) gets me back to the home window.
This is my onClick code:
Code:
def onClick(self, controlID):
"""
Notice: onClick not onControl
Notice: it gives the ID of the control not the control object
"""
try:
print "onClick(): controlID=%i" % controlID
selItem = self.list.getSelectedItem()
id = str(selItem.getProperty("id"))
hasChild = selItem.getProperty("hasChild")
if self.type == "videos":
print 'videos: ' + id
else:
print 'id: ' + id + ', hasChild: ' + hasChild
if hasChild[0].upper() == 'F':
xbmcgui.Dialog().ok('DEMO', 'Not available in demo!')
xbmc.executebuiltin('XBMC.ActivateWindow(Home)')
#(does not work, but the line above does)xbmc.executebuiltin('XBMC.RunScript(q:\skin\myskin\scripts\portal.py))
else:
self.type = "categoryId"
self.typeValue = id
self.removeControl(self.list)
self.createList()
self.doFetch() #this is also called from onInit the first time
print 'after ex'
except StandardError, e:
print 'onClick Fehler: ', e
Could it be that something like a stack overflow occurs when calling runscript too often?
Do I explicitly have to do some close or unload stuff to prevent this misbehaviour?
btw: on the bottom of every script i have the following code (of course the xml names change)
Code:
win = VodOverview("VodOverview.xml", os.getcwd(), "Default", 0)
win.doModal()
del win
Maybe someone can tell me a link to a good WindowXML example.. It seems to me that all the skins and scripts which are already available do not make much use of that WindowXML stuff yet.
I have found out by googling that this FrameMove exception seems to be an error which has been tried to being solved many times but has not been reproducable until now...
I guess, I have been able to reproduce this.