zombie xbmcgui.DialogProgressBG() cleanup?
#1
How do you cleanup a background progress dialog xbmcgui.DialogProgressBG() instances if the user interrupts the script by pressing the back button?
The next time the script is invoked a half-finished zombie DialogProgressBG appears as well as the new one.

Code:
pDialog = xbmcgui.DialogProgressBG()
pDialog.create("long time operation...")
LotsOfWork()
# user presses back button
# so this doesn't execute
pDialog.close()
Reply
#2
Looking at the code you indicate that the script continue when user interfears. Capture it in a while not done?
Edit: You actually said quite the opposite.. doh.

There is probably an event to trap. I dont know how to do it in anything but one of those permanent scripts which i forgot what is called in kodi lingo. Maybe you know how?

The API should reveal the syntax at least.
Reply
#3
(2016-02-18, 09:56)Torben Wrote: Looking at the code you indicate that the script continue when user interfears. Capture it in a while not done?

Thanks for your input but I think the function just gets terminated immediately by the back button. It wouldn't get back to the done test.

The little snippet is from our iplayer addon, such as in the first function in this file:
https://github.com/vonH/plugin.video.ipl...w_radio.py
Reply
#4
(2016-02-18, 09:56)Torben Wrote: Looking at the code you indicate that the script continue when user interfears. Capture it in a while not done?
Edit: You actually said quite the opposite.. doh.

There is probably an event to trap. I dont know how to do it in anything but one of those permanent scripts which i forgot what is called in kodi lingo. Maybe you know how?

The API should reveal the syntax at least.

I didn't make myself clear enough before the edit. Sorry.
I think you are on to something with the equivalent of a SIGINT trap handler.
Reply

Logout Mark Read Team Forum Stats Members Help
zombie xbmcgui.DialogProgressBG() cleanup?0