Problem with dialog.select
#1
Hi everyone,

I'm in the final stages of releasing a skin mod and I can't seem to resolve an issue with a script that is part of the skin mod. Using the following code:

def selectsource(xml):
# Prompt User for source name
dialog = xbmcgui.Dialog()
Listnum = dialog.select(xbmc.getLocalizedString(31095) + "\n" ,xml)
print (xbmc.getLocalizedString(31095) + "\n")
return Listnum
I get a select dialog shown, but the title does not appear on the first line as expected. Instead the very first line shown is the first item in the xml list. The string shows up correctly in the debug log and I have seen the same thing even when I just use a a non localized string. I'm using SVN:21923 of XBMC on windows for testing, but see the same behaviour on the XBox with a build of similar vintage and on various other builds (right up to 22528). I have checked the nightly build logs, but have not seen anything to suggest that this might have been broken.

Is this my bad (and what am I doing wrong in that case) or do I need to post a bug to trak.

Wyrm
If required a FULL debug log can now be submitted from the skin in settings->skin settings->support. Or follow instructions here if you can't access skin settings.

FAQ's located at :- http://kodi.wiki/view/Add-on:AppTV
Reply
#2
Could it be because of the trailing new line (\n) in the dialog.select() heading?!
Reply
#3
Dan, Thanks for the reply, thought no one was listening.

I have tried with and without the trailing newline. Funny thing is that I thought it was working fine a few (not sure which SVN version it was though) versions ago. Probably in the late 20000's but not sure. Unfortunately I have included a few special:// file locations in the script and now it it won't work with anything before mid 21000's.

I guess I was hoping that someone could tell me that I was a goose and had messed something up (I'm still very new to python). Just think that someone else would have spotted something like this if it was a XBMC bug.

Wyrm
If required a FULL debug log can now be submitted from the skin in settings->skin settings->support. Or follow instructions here if you can't access skin settings.

FAQ's located at :- http://kodi.wiki/view/Add-on:AppTV
Reply
#4
@wyrm
We do, it just takes a while for people to get to new threads. I'd say it would make it much easier if you would pack-up what you had and present it in such a way that we could run it ourselves? maybe zip it up and upload it in places like mediafire.com or similar... Or maybe build up a small example program, like you have but populate xml with some sample data.
Reply
#5
Dan Dare Wrote:@wyrm
We do, it just takes a while for people to get to new threads. I'd say it would make it much easier if you would pack-up what you had and present it in such a way that we could run it ourselves? maybe zip it up and upload it in places like mediafire.com or similar... Or maybe build up a small example program, like you have but populate xml with some sample data.

Dan, the skin mod will include two scripts (both with the dialog problem) so there is no reason that I can't post one of them to mediafire.com. Will try to organise for later today (have to drop back to real life for a while). Have had a couple of thoughts about trying to track this down (tried running script from another skin, same result), will try ideas out this evening and post script if no luck.

Thanks again for the help.

Wyrm
If required a FULL debug log can now be submitted from the skin in settings->skin settings->support. Or follow instructions here if you can't access skin settings.

FAQ's located at :- http://kodi.wiki/view/Add-on:AppTV
Reply
#6
Try it in a different skin, update xbmc, etc etc.
Quote:import xbmcgui
xbmcgui.Dialog().select('header', ['a','b','c'])
works fine in r22376.
Always read the XBMC online-manual, FAQ and search and search the forum before posting.
For troubleshooting and bug reporting please read how to submit a proper bug report.

If you're interested in writing addons for xbmc, read docs and how-to for plugins and scripts ||| http://code.google.com/p/xbmc-addons/
Reply
#7
rwparris2 Wrote:Try it in a different skin, update xbmc, etc etc.

works fine in r22376.

Dan and rwparris2,

thanks for the suggestions I think I have pinned it down to a bug in the skin that I am modding. No, not my bug, but one that I need to fix.

Also note to myself to make sure I am NOT running two different types of windows builds at the same time. Running a stand alone and NON stand alone build together makes for an interesting time tracking down problems. Once I twigged to this, script ran fine on other skins, thus problem with dialogselect.xml in my skin. Will fix in the morning after some much needed sleep.

Thanks again
Wyrm
If required a FULL debug log can now be submitted from the skin in settings->skin settings->support. Or follow instructions here if you can't access skin settings.

FAQ's located at :- http://kodi.wiki/view/Add-on:AppTV
Reply
#8
Wohoo, good luck with that and let us know how the skin goes Smile
Reply
#9
Dan Dare Wrote:Wohoo, good luck with that and let us know how the skin goes Smile

Yes Dan, just fixed the problem, it was the dialogselect.xml file. I seemed to have opened a can of worms (funny that)Big Grin with this skin project. I was just going to look after a couple of things to make it a bit more wife friendly, now every time I look at it I find something else to fiddle with. Will try to release what I have done thus far by the weekend. I think there may be a few updates to come.

Thanks again for being a sounding board, proved to be very useful.

Wyrm
If required a FULL debug log can now be submitted from the skin in settings->skin settings->support. Or follow instructions here if you can't access skin settings.

FAQ's located at :- http://kodi.wiki/view/Add-on:AppTV
Reply

Logout Mark Read Team Forum Stats Members Help
Problem with dialog.select0