# a test dialog
class testDialog(Screen):
def testDialogClick(self):
- if self.tries == 0:
- self["title"].setText("Hihi - no, this doesn't work!")
- else:
- self["title"].setText("You tried it %d times without success now!" % self.tries )
+ self["title"].setText(self["menu"].getCurrent())
self.tries += 1
b.onClick = [ self.testDialogClick ]
self["okbutton"] = b
self["title"] = Header("Test Dialog - press ok to leave!")
+ self["menu"] = MenuList()
self.tries = 0