I have stripped things down to the attached minimal example. Anyone?
import gobject
class Class3(gobject.GObject):
__gproperties__ = {'name':
(gobject.TYPE_STRING, "", "", "Playlist", gobject.PARAM_CONSTRUCT|gobject.PARAM_READWRITE)}
__gvalues__ = {}
def do_set_property(self, property, value):
self.__gvalues__[property.name] = value
def do_get_property(self, property):
try:
return self.__gvalues__[property.name]
except KeyError:
return None
def __init__(self, name):
gobject.GObject.__init__(self)
self.props.name = name
print self.props.name
class Class1(gobject.GObject):
__gproperties__ = {'playlists':
(gobject.TYPE_PYOBJECT, "", "", gobject.PARAM_CONSTRUCT|gobject.PARAM_READWRITE)}
__gvalues__ = {}
def do_set_property(self, property, value):
self.__gvalues__[property.name] = value
def do_get_property(self, property):
try:
return self.__gvalues__[property.name]
except KeyError:
return None
def __init__(self):
gobject.GObject.__init__(self)
self.props.playlists = []
names = ['Name1', 'Name2','Name3','Name4']
for x in names:
self.props.playlists.append(Class3(x))
print "-----"
for x in self.props.playlists:
print x.props.name
c1 = Class1()
_______________________________________________
pygtk mailing list [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/