-# components["$002"] = screens["clockDisplay"](components["clock"])
-
- session.open("$002", screens["clockDisplay"](components["clock"]))
-
-
- def blub():
-# x = components["$002"]
- components["$002"].data["okbutton"]["instance"].push()
-# dump(components)
-# print "session, close screen " + str(sys.getrefcount(x))
-# session.close()
-
- tmr = eTimer()
- tmr.timeout.get().append(blub)
- tmr.start(4000, 1)
+ session.open(screens["clockDisplay"](components["clock"]))
+# session.open(screens["testDialog"]())
+
+ # simple reason for this helper function: we want to call the currently
+ # active "okbutton", even when we changed the dialog
+ #
+ # more complicated reason: we don't want to hold a reference.
+# def blub():
+# session.currentDialog.data["okbutton"]["instance"].push()
+# session.currentDialog["okbutton"].setText("hello!")
+#
+# tmr = eTimer()
+# CONNECT(tmr.timeout, blub)
+# tmr.start(4000, 0)
+#
+ CONNECT(keyPressedSignal(), session.keyEvent)