PageRenderTime 81ms CodeModel.GetById 40ms app.highlight 2ms RepoModel.GetById 38ms app.codeStats 0ms

/examples/onclicktest/OnClickTest.py

http://pyjamas.googlecode.com/
Python | 21 lines | 12 code | 9 blank | 0 comment | 0 complexity | 1a6e399df01b6c55ec6ec38125c46609 MD5 | raw file
 1from ui import Button, RootPanel
 2import Window
 3
 4
 5def onButtonClick(sender):
 6	Window.alert("function called")
 7
 8
 9class OnClickTest:
10	def onModuleLoad(self):
11		self.b = Button("function callback", onButtonClick)
12		self.b2 = Button("object callback", self)
13		RootPanel().add(self.b)
14		RootPanel().add(self.b2)
15
16	def onClick(self, sender):
17		Window.alert("object called")
18
19
20
21