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
void eListbox::recalcSize()
{
- eDebug("recalc size");
m_itemheight = 20;
m_content->setSize(eSize(size().width(), m_itemheight));
m_items_per_page = size().height() / m_itemheight;
- eDebug("done!");
}
*/
+%define RefCount(...)
+%typemap(newfree) __VA_ARGS__ * { eDebug("adding ref"); $1->AddRef(); }
+%extend __VA_ARGS__ { ~__VA_ARGS__() { eDebug("removing ref!"); self->Release(); } }
+%ignore __VA_ARGS__::~__VA_ARGS__();
+%enddef
%module enigma
%{
extern PSignal1<void,int> &keyPressedSignal();
%}
+RefCount(eListboxPythonStringContent)
+
#define DEBUG
%include "stl.i"
%include <lib/base/object.h>
# test our screens
components["$001"] = screens["testDialog"]()
-print "*** classes:"
-dump(screens)
-
-print "*** instances:"
-dump(components)
+#print "*** classes:"
+#dump(screens)
+#
+#print "*** instances:"
+#dump(components)
# display
self.currentWindow = None
def keyEvent(self, code):
- print "code " + str(code)
+# print "code " + str(code)
if code == 32:
self.currentDialog.data["okbutton"]["instance"].push()