From: Kevin A. <ka...@us...> - 2004-05-11 11:45:44
|
Update of /cvsroot/pythoncard/PythonCard/samples/hopalong In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3464 Modified Files: hopalong.py Log Message: changed 0 and 1 to False and True; removed from __future__ import Index: hopalong.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/hopalong/hopalong.py,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** hopalong.py 5 May 2004 16:53:26 -0000 1.26 --- hopalong.py 11 May 2004 11:45:31 -0000 1.27 *************** *** 6,11 **** """ - from __future__ import generators - from PythonCard import model import math --- 6,9 ---- *************** *** 29,35 **** def on_initialize(self, event): ! self.x = 0 ! self.y = 0 ! self.drawing = 0 self.components.bufOff.backgroundColor = 'black' self.components.bufOff.clear() --- 27,31 ---- def on_initialize(self, event): ! self.drawing = False self.components.bufOff.backgroundColor = 'black' self.components.bufOff.clear() *************** *** 124,139 **** elapsed = stoptime - starttime self.statusBar.text = "hopalong time: %f seconds (%d points drawn)" % (elapsed, totalPointsDrawn) ! self.drawing = 0 ! self.components.btnDraw.enabled = 1 ! self.components.btnCancel.enabled = 0 def on_btnDraw_mouseClick(self, event): self.drawing = not self.drawing ! event.target.enabled = 0 ! self.components.btnCancel.enabled = 1 self.doHopalong() def on_btnCancel_mouseClick(self, event): ! self.drawing = 0 def on_editClear_command(self, event): --- 120,135 ---- elapsed = stoptime - starttime self.statusBar.text = "hopalong time: %f seconds (%d points drawn)" % (elapsed, totalPointsDrawn) ! self.drawing = False ! self.components.btnDraw.enabled = True ! self.components.btnCancel.enabled = False def on_btnDraw_mouseClick(self, event): self.drawing = not self.drawing ! event.target.enabled = False ! self.components.btnCancel.enabled = True self.doHopalong() def on_btnCancel_mouseClick(self, event): ! self.drawing = False def on_editClear_command(self, event): *************** *** 141,145 **** def on_close(self, event): ! self.drawing = 0 event.skip() --- 137,141 ---- def on_close(self, event): ! self.drawing = False event.skip() |