2011-06-24, 10:51
I'm writing a script that polls a server-ip and a port. Now I want to set ip-adress and port via configuration-dialog (<path-to-script>/resources/settings.xml):
This works fine for me, but when I try to get settings my script fails with
The code:
What should be wrong?
_BJ1
Code:
<settings>
<setting id="cti_server" type="text" label="30000" default="127.0.0.1" />
<setting id="cti_port" type="text" label="30001" default="7777" />
</settings>
This works fine for me, but when I try to get settings my script fails with
Code:
10:47:02 T:3047152496 M:1438986240 ERROR: Error Type: <type 'exceptions.AttributeError'>
10:47:02 T:3047152496 M:1438986240 ERROR: Error Contents: 'module' object has no attribute 'getSetting'
10:47:02 T:3047152496 M:1438986240 ERROR: Traceback (most recent call last): File "...", line 2, in <module> c_ipaddr=xbmc.getSetting("cti_server")
The code:
Code:
import xbmc
c_ipaddr=xbmc.getSetting("cti_server")
c_port=xbmc.getSetting('cti_port')
What should be wrong?
_BJ1