WindowXML lists clearing
#1
Today I noticed that the lists in my WindowXML scripts are clearing out by them self.

I have two windows (1 and 2, both WindowXML) with each one list (List A and B). At some point I hide list A in window 1 (only the list). Then I show window 2 with list B. Finally I close window 2 again and go back to window 1. At this point List A is still hidden. When I unhid it (set it visible) the list seems to have cleared!

Check my XOT-Uzg script: select a channel, select a program and then scroll through the episodes. Then go back to the program list (that one is still filled, but it isn't a windowxml list), go back again and you end up with an empty list where the channels should have been.

I checked the debug log file of XBMC, but I cannot see any errors related to this. Anyone a clue?
Reply
#2
Whenever a window is closed the list is freed. Thus, setup your list whenever you initialize the window in onInit. This ensures that you always end up with what you want.
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
#3
jmarshall Wrote:Whenever a window is closed the list is freed. Thus, setup your list whenever you initialize the window in onInit. This ensures that you always end up with what you want.

But it is not closed. I open a second window while the list is hidden. Then when I close the second window and come back to the first one, the list of that one (first one) is empty. It was just at the background while the second window was on top.
Reply
#4
this is the way it works now. just store your info, then call your function to fill the list. the alternative is make the second window a dialog.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#5
Nuka1195 Wrote:this is the way it works now. just store your info, then call your function to fill the list. the alternative is make the second window a dialog.

Oke then, I will see what I will do. Thanks for the info.
Reply
#6
If you open a second window then the first is closed, unless the second is a dialog.

Cheers,
Jonathan
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
#7
Oke, I am modifying my scripts to work with these changes, but the more I work with it the less I understand this move in clearing the lists.

Example: Lets say I have list with a lot of video items. I scrolled down a to the 32nd, or whatever item, and click it to start playback. When the playbacks stops I end up at the same window, but the list is empty. To me, that is not logical.

Of course I could reload the list, but then I also need to restore the selected position (else the user needs to scroll down again). But is the list was long, it will take some time every time it is done.

That is a lot of work for a change in the XBMC source code. Was there a reason to do this? The moving of the skin fallback folder I understand, but this? May I ask the reason for doing this?
Reply
#8
You shouldn't need to restore the position - XBMC does that for you, assuming the list is up at the appropriate time. There's currently some problems as we don't wait on python to process stuff - this means that if python's onInit() is executed slowly, then some things may start rendering before it's ready.

The reason the change was made is to bring it inline with the rest of the code. All XBMC windows do this. It has some obvious advantages:

1. Less memory used.
2. Makes sure that the list is always free'd when the script exits.
3. No need to keep a "first loaded" state to handle what to do in onInit().

Obviously all consideration will be made into making it easy for scripters.

Perhaps Nuka1195 can indicate how he handles things in AMT?

Cheers,
Jonathan
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
WindowXML lists clearing0