Update of /cvsroot/pythoncard/PythonCard/samples/turtle/scripts
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27334/samples/turtle/scripts
Modified Files:
fourBugs.py pentests.py
Log Message:
added WXMAC workaround to update display during drawing
Index: pentests.py
===================================================================
RCS file: /cvsroot/pythoncard/PythonCard/samples/turtle/scripts/pentests.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** pentests.py 8 Aug 2004 18:07:45 -0000 1.2
--- pentests.py 8 Aug 2004 18:21:28 -0000 1.3
***************
*** 1,4 ****
--- 1,7 ----
from wrappers import Turtle
+ # KEA 2004-08-08
+ # workaround for Mac not updating display until idle
+ import wx
def draw(canvas):
***************
*** 42,45 ****
--- 45,52 ----
eval('t' + i + '.forward(50)')
eval('t' + i + '.pd()')
+ # KEA 2004-08-08
+ # workaround for Mac not updating display until idle
+ if wx.Platform == '__WXMAC__':
+ canvas.redraw()
tList = [t1, t2, t3]
***************
*** 51,53 ****
--- 58,64 ----
# huge delay so we can see the turtle
#for j in range(1000000): pass
+ # KEA 2004-08-08
+ # workaround for Mac not updating display until idle
+ if wx.Platform == '__WXMAC__':
+ canvas.redraw()
Index: fourBugs.py
===================================================================
RCS file: /cvsroot/pythoncard/PythonCard/samples/turtle/scripts/fourBugs.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fourBugs.py 11 May 2004 01:12:51 -0000 1.1
--- fourBugs.py 8 Aug 2004 18:21:27 -0000 1.2
***************
*** 6,9 ****
--- 6,10 ----
from wrappers import Turtle
+ import wx
def draw(canvas):
***************
*** 65,68 ****
--- 66,71 ----
bList[b].fd(1)
canvas.refresh()
+ if wx.Platform == '__WXMAC__':
+ canvas.redraw()
canvas.autoRefresh = tempAutoRefresh
|