How to properly manage window stack in script?
#1
Hello!

I'm writing a python script and ran into a problem with handling and managing multiple windows.
Here is a more detailed description of the problem:

GUI has several major sections, for example - [Home, Films, Account, Help]. Some of these sections also have child sections.
Menu with major sections is visible on any screen.
When the user navigates within one of the major sections - all looks good and logical. Window stack may look like:
Home -> Films -> Genres -> Film
User can take a few steps back and it looks logical too.

But when the user goes from [Film] directly to the one of main sections, [Account] for example - the stack will look like this:
Home -> Films -> Genres -> Film -> Account
And this is wrong and illogical, from a human point of view. In this case, the stack should look like "Home -> Account", or just "Account".

This situation arises from a simple approach to the transition between the windows:
- there are several classes (HomeWindow, FilmWindow, etc.) derived from xbmcgui.Window/WindowXML
- when we need to go to other window - we simply create a new instance and call .doModal()

How to do it right? How to properly manage the window stack to avoid these situations?
How to clean stack or go directly to the desired window in stack?

Thank you!
Reply
#2
XBMC uses a stack and searches in the stack to check whether you've cycled back. You want to do the same I guess.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply

Logout Mark Read Team Forum Stats Members Help
How to properly manage window stack in script?0