Questions about changes in XBMC API in Python
#1
Sad 
Hi everybody,

I have few questions and remarks about the recent changes (post Atlantis) in XBMC API in Python (xbmc, xbmcplugin, xbmcgui).

I have notice with the last version of XBMC (from SVN) the method getSpinControl() has been removed form ControlTextBox class.
The consequence is scripts using a ControlTextBox doesn't offer text display on few pages or even worst the one calling getSpinControl() are broken and five an error like:
Code:
15:12:13 T:14100 M:965652480  NOTICE: 'xbmcgui.ControlTextBox' object has no attribute 'getSpinControl'
  • My first question is why getSpinControl has been removed in the ControlTextBox class in xbmcgui API? And it is replaced by something else?
  • My second question is why not keeping the API compatible with previous version of the API when such changes are made in it. For instance, if getSpinControl is replaced by something else, keeping it, mentioning in the doc that it is deprecated and what is the new API replacing it.

I understand XBMC is a living software (and an amzing one Nod), but I think it is a shame any change in Python API make script/plugin broken. I totally support improvement of the API, but just compatibility with previous API would be a big plus.

Thanks for your answers Smile
Image
_____________________________

Repositories Installer: select and install unofficial repositories / TAC.TV: watch videos on TAC.TV
Installer Passion-XBMC: Download and Install Add-ons (pre-Dharma only)

Image
Reply
#2
me too.
Reply
#3
if your creating a gui, you should be using windoxml. in which case add your own spinner or scrollbar.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#4
The change was made ages ago. A textbox doesn't hold on to a spincontrol (and it never should have from the beginning).

With something like this is it basically impossible to provide backward compatibility, so we don't. Most major scripts are using windowxml, which means you get to skin it anyway you like.
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
#5
Ok, thank you for your answer.
I just would like to mention, there are still a lot of scripts which are still using Window (and not WindowXML), and modifying all of them to use WindowXML instead, would be pretty significant work.
More over WindowXML is a very powerful thing but also more difficult to learn than Window and a lot of beginner still prefer to use the basic Window because of that.
So for all those reasons it would be nice to still keep backward compatibility because of those when it is possible of course, please don't forget this little feedback.
Thanks!
Image
_____________________________

Repositories Installer: select and install unofficial repositories / TAC.TV: watch videos on TAC.TV
Installer Passion-XBMC: Download and Install Add-ons (pre-Dharma only)

Image
Reply
#6
Hello.

Thanks to everybody. I'm trying to learn scripting and skinning for few weeks. I've been fighting to get multirss and tvguide on with latest svn.

Unfortunally, after using windowxml, I'm getting an error:

Python script failed
special://home/scripts/TVGuide/default.py

I'm looking for "special://home/scripts" error in forum unsuccesfully. Are there other svn changes that involves basic scripting rules?

Thanks in advance.
Reply
#7
@jpoveda

The special:// paths came out recently, see more details here

I don't think that affects you though, that message is simply telling the path in the new format to the script that's failing. You need to look at the xbmc.log for the actual error / stack trace.
Reply
#8
Hello,

The message appears if I use windowXML instead of Window. I've been reading posts about windowXML in http://forum.xbmc.org/showthread.php?tid=24839 and I notized I need to do another steep to control XBMC. I gonna see the link.

Thanks a lot.
Reply

Logout Mark Read Team Forum Stats Members Help
Questions about changes in XBMC API in Python1