[python-nl] list probleem

jpam jpamvanderouderaa at orange.nl
Mon Jul 2 17:30:15 CEST 2007


hallo allemaal

ben pas begonnen met het leren van python script.
maar ik heb n probleem met items toevoegen in een list control
kan iemand mij helpen wat ik fout doe, ik krijg iedere keer 'n error "text
instance has no attribute 'getlabel' "

ben er al dagen zoet mee :)
hier onder het scriptje;
alvast bedankt voor einige hulp!
===============================

import xbmc, xbmcgui, urllib, re, os, string
from xml.dom import minidom

try: Emulating = xbmcgui.Emulating
except: Emulating = False

usock = urllib.urlopen('http://www.metacafe.com/tags/cats/rss.xml')
xmldoc = minidom.parse(usock)

#get actioncodes from keymap.xml
ACTION_PREVIOUS_MENU = 10
ACTION_SELECT_ITEM   =  7

class MyClass(xbmcgui.Window):
    def __init__(self):
        if Emulating: xbmcgui.Window.__init__(self)
        #self.addControl(xbmcgui.ControlImage(0,0,720,480,
"Q:\\scripts\\jan\\background.png"))
        self.list = xbmcgui.ControlList(210, 120, 530, 410)
        self.addControl(self.list)

        name = xmldoc.getElementsByTagName('title')
        for title in name:
            node = title.firstChild
            self.list.addItem(node)
            #print node.toxml()
            self.setFocus(self.list)

mydisplay = MyClass()
mydisplay.doModal()
del mydisplay
-- 
View this message in context: http://www.nabble.com/list-probleem-tf4012949.html#a11396073
Sent from the Python - python-nl mailing list archive at Nabble.com.



More information about the Python-nl mailing list