fixed refcount of eListboxPythonStringContent
[vuplus_dvbapp] / components.py
index 2082718..52c9460 100644 (file)
@@ -229,17 +229,18 @@ class MenuList(HTMLComponent, GUIComponent):
                GUIComponent.__init__(self)
        
        def getCurrent(self):
-               return self.l.getCurrentSelection()
+#              return self.l.getCurrentSelection()
+               return "none"
        
        def GUIcreateInstance(self, priv, parent, skindata):
                g = eListbox(parent)
                # BIG BIG HACK. :( we have to ensure that the eListboxPythonStringContent doesn't get destroyed.
                # we really have to take a look at the GC stuff
-               self.l = eListboxPythonStringContent()
-               self.l.setList(["Test Object 1", "Item #2", "Item #3", "nun kommt eine Zahl:", 15, "Bla fasel", "lulabla"])
-               g.setContent(self.l)
+               l = eListboxPythonStringContent()
+               l.setList(["Test Object 1", "Item #2", "Item #3", "nun kommt eine Zahl:", 15, "Bla fasel", "lulabla"])
+               g.setContent(l)
                return g
        
        def GUIdeleteInstance(self, g):
                g.setContent(None)
-               del self.l
+               #del self.l