return self.getText()
class Button(HTMLComponent, GUIComponent, VariableText):
- onClick = {}
-
def __init__(self, text=""):
GUIComponent.__init__(self)
VariableText.__init__(self)
self.setText(text)
+ self.onClick = [ ]
+
+ def clicked(self):
+ for x in self.onClick:
+ x()
+ return 0
+
+ def GUIcreate(self, priv, parent, skindata):
+ GUIComponent.GUIcreate(self, priv,parent, skindata)
+ priv["instance"].selected.get().append(self.clicked)
def click(self):
for x in self.onClick:
# button.resize(eSize(80, 50))
wnd.show()
+
+ components["$002"].data["okbutton"]["instance"].push()
for x in range(200):
time.sleep(0.1)
r = 200 - x
else:
r = x
- components["$002"]["okbutton"].setValue(r)
+# components["$002"]["okbutton"].setValue(r)
desktop.paint()
#
return 0
+
+def testI2(a):
+ print "PYTHON says: it's a " + str(a) + "!!!"
+ return 0
+
+def testI(a = 0):
+ print "magic integer is " + str(a)
+
+ list = testsignal.get()
+ print "list -> " + str(list)
+ list.append(testI2)
+ return 1