comparison clients/pychan_demo/pychan_test.py @ 157:bb9902910067

input_rework merged! Bad features: * Broken DND for zero-projekt. * Design short-comings.
author phoku@33b003aa-7bff-0310-803a-e67f0ece8222
date Tue, 14 Oct 2008 07:41:48 +0000
parents fe7ff4808529
children c305c5eda7ed
comparison
equal deleted inserted replaced
156:376b8afc9a18 157:bb9902910067
50 'closeButton' : self.quit, 50 'closeButton' : self.quit,
51 'demoList' : self.selectExample, 51 'demoList' : self.selectExample,
52 'slider': self.test_slider 52 'slider': self.test_slider
53 } 53 }
54 self.gui.mapEvents(eventMap) 54 self.gui.mapEvents(eventMap)
55 credits = self.gui.findChild(name="creditsLink")
56 credits.setEnterCallback(lambda w : credits._setText("CREDITS"))
57 credits.capture(lambda : credits._setText("Credits"), event_name="mouseExited")
55 58
56 from dynamic import DynamicExample 59 from dynamic import DynamicExample
57 from styling import StylingExample 60 from styling import StylingExample
58 61
59 self.examples = { 62 self.examples = {
80 self.gui.findChild(name="xmlSource").text = open(self.currentExample.xmlFile).read() 83 self.gui.findChild(name="xmlSource").text = open(self.currentExample.xmlFile).read()
81 self.currentExample.start() 84 self.currentExample.start()
82 85
83 def showCredits(self): 86 def showCredits(self):
84 print pychan.loadXML('gui/credits.xml').execute({ 'okButton' : "Yay!" }) 87 print pychan.loadXML('gui/credits.xml').execute({ 'okButton' : "Yay!" })
85
86 def test_slider(self): 88 def test_slider(self):
87 self.slider_value._setText( str(self.slider.getValue()) ) 89 self.slider_value._setText( str(self.slider.getValue()) )
88 90
89 class TestXMLApplication(basicapplication.ApplicationBase): 91 class TestXMLApplication(basicapplication.ApplicationBase):
90 """ 92 """