You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
(45) |
May
(185) |
Jun
|
Jul
(36) |
Aug
(205) |
Sep
(98) |
Oct
(107) |
Nov
(6) |
Dec
(3) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(1) |
Feb
(2) |
Mar
(19) |
Apr
(26) |
May
(18) |
Jun
|
Jul
(12) |
Aug
(16) |
Sep
(22) |
Oct
(7) |
Nov
(11) |
Dec
(74) |
2006 |
Jan
(14) |
Feb
(1) |
Mar
(3) |
Apr
(3) |
May
(14) |
Jun
(5) |
Jul
(20) |
Aug
(10) |
Sep
(1) |
Oct
|
Nov
(4) |
Dec
(1) |
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
(14) |
Aug
|
Sep
|
Oct
(6) |
Nov
(1) |
Dec
|
From: Kevin A. <ka...@us...> - 2004-09-12 17:28:21
|
Update of /cvsroot/pythoncard/PythonCard/tools/resourceEditor/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24517/modules Modified Files: propertyEditor.py Log Message: added stringSelection to property display and update code Index: propertyEditor.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/resourceEditor/modules/propertyEditor.py,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -d -r1.52 -r1.53 *** propertyEditor.py 24 Aug 2004 19:01:37 -0000 1.52 --- propertyEditor.py 12 Sep 2004 17:28:12 -0000 1.53 *************** *** 203,207 **** value = self.components.wField.text ! if propName not in ['label', 'text', 'toolTip']: try: value = eval(value) --- 203,207 ---- value = self.components.wField.text ! if propName not in ['label', 'stringSelection', 'text', 'toolTip']: try: value = eval(value) *************** *** 362,366 **** ##widget = self.components[wName] widget = self._comp[wName] ! if propName in ['label', 'text', 'toolTip'] or propName in checkItems: value = getattr(widget, propName) else: --- 362,366 ---- ##widget = self.components[wName] widget = self._comp[wName] ! if propName in ['label', 'stringSelection', 'text', 'toolTip'] or propName in checkItems: value = getattr(widget, propName) else: |
From: Kevin A. <ka...@us...> - 2004-09-11 17:18:53
|
Update of /cvsroot/pythoncard/PythonCard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22004 Modified Files: util.py Log Message: changed readAndEvalFile to use splitlines Index: util.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/util.py,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** util.py 24 Aug 2004 20:16:46 -0000 1.32 --- util.py 11 Sep 2004 17:18:44 -0000 1.33 *************** *** 37,41 **** def readAndEvalFile(filename): f = open(filename) ! txt = f.read().replace('\r\n','\n') f.close() return eval(txt, globals()) --- 37,47 ---- def readAndEvalFile(filename): f = open(filename) ! # KEA 2004-09-11 ! # this should be a cleaner way of changing line endings ! # that works for the Mac (\r) as well as Windows (\r\n) line endings ! # but just in case this breaks something I'll leave the ! # old way commented out ! #txt = f.read().replace('\r\n','\n') ! txt = '\n'.join(f.readlines()) f.close() return eval(txt, globals()) |
From: Kevin A. <ka...@us...> - 2004-09-11 15:46:15
|
Update of /cvsroot/pythoncard/PythonCard/docs/html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1244/html Modified Files: macosx_installation.html macosx_jaguar_installation.html windows_installation.html Log Message: changed to wxPython 2.5.2.8 Index: macosx_jaguar_installation.html =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/docs/html/macosx_jaguar_installation.html,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** macosx_jaguar_installation.html 18 Aug 2004 18:22:33 -0000 1.7 --- macosx_jaguar_installation.html 11 Sep 2004 15:46:05 -0000 1.8 *************** *** 34,38 **** desktop.</p> <h2>Downloading wxPython</h2> ! <p>PythonCard relies on the wxPython package. Click on this <a href="http://prdownloads.sourceforge.net/wxpython/wxPythonOSX-2.5.2.7-jaguar-Py2.3.dmg">wxPythonOSX-2.5.2.7-jaguar-Py2.3.dmg</a> link to begin the download. Again, most Mac OS X browsers will save the file to your desktop.</p> --- 34,38 ---- desktop.</p> <h2>Downloading wxPython</h2> ! <p>PythonCard relies on the wxPython package. Click on this <a href="http://prdownloads.sourceforge.net/wxpython/wxPythonOSX-2.5.2.8-jaguar-Py2.3.dmg">wxPythonOSX-2.5.2.8-jaguar-Py2.3.dmg</a> link to begin the download. Again, most Mac OS X browsers will save the file to your desktop.</p> *************** *** 54,58 **** <h2>Installing wxPython</h2> <p>wxPython also comes as an installable disk image. Just double-click on the ! file you downloaded (it's called wxPythonOSX-2.5.2.7-jaguar-Py2.3.dmg), then double-click the wxPythonOSX-jaguar.pkg icon and follow the instructions. wxPython will be installed into <span class="code">/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/</span>.</p> --- 54,58 ---- <h2>Installing wxPython</h2> <p>wxPython also comes as an installable disk image. Just double-click on the ! file you downloaded (it's called wxPythonOSX-2.5.2.8-jaguar-Py2.3.dmg), then double-click the wxPythonOSX-jaguar.pkg icon and follow the instructions. wxPython will be installed into <span class="code">/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/</span>.</p> Index: macosx_installation.html =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/docs/html/macosx_installation.html,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** macosx_installation.html 19 Aug 2004 14:48:36 -0000 1.19 --- macosx_installation.html 11 Sep 2004 15:46:05 -0000 1.20 *************** *** 35,39 **** desktop.</p> <h2>Downloading wxPython</h2> ! <p>PythonCard relies on the wxPython package. Click on this <a href="http://prdownloads.sourceforge.net/wxpython/wxPythonOSX-2.5.2.7-panther-Py2.3.dmg">wxPythonOSX-2.5.2.7-panther-Py2.3.dmg</a> link to begin the download. Again, most Mac OS X browsers will save the file to your desktop.</p> --- 35,39 ---- desktop.</p> <h2>Downloading wxPython</h2> ! <p>PythonCard relies on the wxPython package. Click on this <a href="http://prdownloads.sourceforge.net/wxpython/wxPythonOSX-2.5.2.8-panther-Py2.3.dmg">wxPythonOSX-2.5.2.8-panther-Py2.3.dmg</a> link to begin the download. Again, most Mac OS X browsers will save the file to your desktop.</p> *************** *** 51,55 **** <h2>Installing wxPython</h2> <p>wxPython also comes as an installable disk image. Just double-click on the ! file you downloaded (it's called wxPythonOSX-2.5.2.7-panther-Py2.3.dmg), then double-click the wxPythonOSX-panther.pkg icon and follow the instructions. wxPython will be installed into <span class="code">/Library/Python/2.3/</span>. Note that this is the same directory as <span class="code">/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/</span> since the two directories are connected by a symbolic link in the file system.</p> --- 51,55 ---- <h2>Installing wxPython</h2> <p>wxPython also comes as an installable disk image. Just double-click on the ! file you downloaded (it's called wxPythonOSX-2.5.2.8-panther-Py2.3.dmg), then double-click the wxPythonOSX-panther.pkg icon and follow the instructions. wxPython will be installed into <span class="code">/Library/Python/2.3/</span>. Note that this is the same directory as <span class="code">/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/</span> since the two directories are connected by a symbolic link in the file system.</p> Index: windows_installation.html =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/docs/html/windows_installation.html,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** windows_installation.html 18 Aug 2004 18:22:33 -0000 1.14 --- windows_installation.html 11 Sep 2004 15:46:06 -0000 1.15 *************** *** 35,39 **** browser.</p> <h2>Downloading wxPython</h2> ! <p>PythonCard relies on the wxPython package. Click on this <a href="http://prdownloads.sourceforge.net/wxpython/wxPythonWIN32-2.5.2.7-Py23.exe">wxPython 2.5.2.7 for Python 2.3.x</a> link to begin the download. Tell your browser where you want the file stored and the download proceeds. Note where on your system the file is saved by your --- 35,39 ---- browser.</p> <h2>Downloading wxPython</h2> ! <p>PythonCard relies on the wxPython package. Click on this <a href="http://prdownloads.sourceforge.net/wxpython/wxPythonWIN32-2.5.2.8-Py23.exe">wxPython 2.5.2.8 for Python 2.3.x</a> link to begin the download. Tell your browser where you want the file stored and the download proceeds. Note where on your system the file is saved by your *************** *** 55,59 **** <h2>Installing wxPython</h2> <p>wxPython also comes as an automatic installer. Just double-click on the ! file you downloaded (it's called wxPythonWIN32-2.5.2.7-Py23.exe) and follow the instructions. By default, wxPython will be installed into Python23\Lib\site-packages.</p> --- 55,59 ---- <h2>Installing wxPython</h2> <p>wxPython also comes as an automatic installer. Just double-click on the ! file you downloaded (it's called wxPythonWIN32-2.5.2.8-Py23.exe) and follow the instructions. By default, wxPython will be installed into Python23\Lib\site-packages.</p> |
From: Kevin A. <ka...@us...> - 2004-09-11 06:34:19
|
Update of /cvsroot/pythoncard/PythonCard/components In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30601/components Modified Files: calendar.py Log Message: started adding support for wxPython 2.5.2.9 datetime Index: calendar.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/components/calendar.py,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** calendar.py 8 Aug 2004 15:20:38 -0000 1.19 --- calendar.py 11 Sep 2004 06:34:08 -0000 1.20 *************** *** 5,8 **** --- 5,9 ---- """ + import datetime import wx from wx import calendar *************** *** 12,16 **** def decorate(self, aWxEvent, source): aWxEvent = event.Event.decorate(self, aWxEvent, source) ! aWxEvent.date = aWxEvent.GetDate() return aWxEvent --- 13,20 ---- def decorate(self, aWxEvent, source): aWxEvent = event.Event.decorate(self, aWxEvent, source) ! if wx.VERSION >= (2,5,2,9): ! aWxEvent.date = aWxEvent.PyGetDate() ! else: ! aWxEvent.date = aWxEvent.GetDate() return aWxEvent *************** *** 93,100 **** self._bindEvents(event.WIDGET_EVENTS + CalendarEvents) ! # KEA 2002-07-09 ! # use same name as wxPython calendar module ! def SetNow(self): ! self.SetDate(wx.DateTime_Now()) --- 97,111 ---- self._bindEvents(event.WIDGET_EVENTS + CalendarEvents) ! if wx.VERSION >= (2,5,2,9): ! def SetNow(self): ! self.PySetDate(datetime.date.today()) ! ! date = property(calendar.CalendarCtrl.PyGetDate, calendar.CalendarCtrl.PySetDate) ! ! else: ! # KEA 2002-07-09 ! # use same name as wxPython calendar module ! def SetNow(self): ! self.SetDate(wx.DateTime_Now()) |
From: Kevin A. <ka...@us...> - 2004-09-10 19:58:17
|
Update of /cvsroot/pythoncard/PythonCard/tools/resourceEditor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22705/tools/resourceEditor Modified Files: resourceEditor.py Log Message: cleaner way of replacing \r with \n Index: resourceEditor.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/resourceEditor/resourceEditor.py,v retrieving revision 1.212 retrieving revision 1.213 diff -C2 -d -r1.212 -r1.213 *** resourceEditor.py 10 Sep 2004 18:10:23 -0000 1.212 --- resourceEditor.py 10 Sep 2004 19:57:52 -0000 1.213 *************** *** 1512,1516 **** # which causes eval to fail if wx.Platform == '__WXMAC__': ! desc = desc.replace(", \r ", ", \n ") # this is dangerous so we need a better way of converting # the text in the clipboard to a dictionary safely --- 1512,1516 ---- # which causes eval to fail if wx.Platform == '__WXMAC__': ! desc = '\n'.join(desc.splitlines()) # this is dangerous so we need a better way of converting # the text in the clipboard to a dictionary safely |
From: Kevin A. <ka...@us...> - 2004-09-10 18:10:42
|
Update of /cvsroot/pythoncard/PythonCard/tools/resourceEditor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv624 Modified Files: resourceEditor.py Log Message: fixed component paste on Mac Index: resourceEditor.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/resourceEditor/resourceEditor.py,v retrieving revision 1.211 retrieving revision 1.212 diff -C2 -d -r1.211 -r1.212 *** resourceEditor.py 10 Sep 2004 17:52:38 -0000 1.211 --- resourceEditor.py 10 Sep 2004 18:10:23 -0000 1.212 *************** *** 547,551 **** if self.startName in self.components: - print "dragging" if not self.movingComponent and self.resizingHandleTarget: self.resizingHandler[self.resizingHandleTarget](event) --- 547,550 ---- *************** *** 1509,1512 **** --- 1508,1516 ---- if not isinstance(desc, str): return + # KEA 2004-09-10 + # the clipboard is converting newlines to returns + # which causes eval to fail + if wx.Platform == '__WXMAC__': + desc = desc.replace(", \r ", ", \n ") # this is dangerous so we need a better way of converting # the text in the clipboard to a dictionary safely |
From: Kevin A. <ka...@us...> - 2004-09-10 17:52:48
|
Update of /cvsroot/pythoncard/PythonCard/tools/resourceEditor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29789 Modified Files: resourceEditor.py Log Message: fixed messageDialog with wx.ICON_INFORMATION | wx.YES_NO | wx.NO_DEFAULT Index: resourceEditor.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/resourceEditor/resourceEditor.py,v retrieving revision 1.210 retrieving revision 1.211 diff -C2 -d -r1.210 -r1.211 *** resourceEditor.py 22 Aug 2004 19:11:34 -0000 1.210 --- resourceEditor.py 10 Sep 2004 17:52:38 -0000 1.211 *************** *** 547,550 **** --- 547,551 ---- if self.startName in self.components: + print "dragging" if not self.movingComponent and self.resizingHandleTarget: self.resizingHandler[self.resizingHandleTarget](event) *************** *** 931,935 **** msg = "You will lose any changes you've made to %s.\n\nAre you sure you want to revert to the last saved version?" % filename result = dialog.messageDialog(self, msg, 'resourceEditor', ! wx.ICON_EXCLAMATION | wx.YES_NO | wx.CANCEL) save = result.returnedString if save == "Cancel" or save == "No": --- 932,936 ---- msg = "You will lose any changes you've made to %s.\n\nAre you sure you want to revert to the last saved version?" % filename result = dialog.messageDialog(self, msg, 'resourceEditor', ! wx.ICON_EXCLAMATION | wx.YES_NO | wx.CANCEL | wx.NO_DEFAULT) save = result.returnedString if save == "Cancel" or save == "No": *************** *** 1114,1118 **** aWidget = self.components[self.startName] msg = "Are you sure you want to delete %s %s?" % (aWidget.__class__.__name__, aWidget.name) ! result = dialog.messageDialog(self, msg, 'Delete Component', wx.ICON_INFORMATION) if result.accepted: self.hideSizingHandles() --- 1115,1120 ---- aWidget = self.components[self.startName] msg = "Are you sure you want to delete %s %s?" % (aWidget.__class__.__name__, aWidget.name) ! result = dialog.messageDialog(self, msg, 'Delete Component', ! wx.ICON_INFORMATION | wx.YES_NO | wx.NO_DEFAULT) if result.accepted: self.hideSizingHandles() *************** *** 1486,1490 **** aWidget = self.components[self.startName] msg = "Are you sure you want to Cut %s %s?" % (aWidget.__class__.__name__, aWidget.name) ! result = dialog.messageDialog(self, msg, 'Cut Component', wx.ICON_INFORMATION) if result.accepted: self.copyWidgetDescriptionToClipboard(self.startName) --- 1488,1493 ---- aWidget = self.components[self.startName] msg = "Are you sure you want to Cut %s %s?" % (aWidget.__class__.__name__, aWidget.name) ! result = dialog.messageDialog(self, msg, 'Cut Component', ! wx.ICON_INFORMATION | wx.YES_NO | wx.NO_DEFAULT) if result.accepted: self.copyWidgetDescriptionToClipboard(self.startName) |
From: Kevin A. <ka...@us...> - 2004-09-09 21:08:55
|
Update of /cvsroot/pythoncard/PythonCard/components In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8362/components Modified Files: grid.py Log Message: changed col to column since we are trying to avoid abbreviations Index: grid.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/components/grid.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** grid.py 9 Sep 2004 20:04:23 -0000 1.12 --- grid.py 9 Sep 2004 21:08:46 -0000 1.13 *************** *** 67,72 **** id = wx.grid.wxEVT_GRID_ROW_SIZE ! class GridColSizeEvent(GridEvent): ! name = 'colSize' binding = wx.grid.EVT_GRID_COL_SIZE id = wx.grid.wxEVT_GRID_COL_SIZE --- 67,72 ---- id = wx.grid.wxEVT_GRID_ROW_SIZE ! class GridColumnSizeEvent(GridEvent): ! name = 'columnSize' binding = wx.grid.EVT_GRID_COL_SIZE id = wx.grid.wxEVT_GRID_COL_SIZE *************** *** 113,117 **** GridLabelContextDoubleClickEvent, GridRowSizeEvent, ! GridColSizeEvent, GridRangeSelectEvent, GridCellChangeEvent, --- 113,117 ---- GridLabelContextDoubleClickEvent, GridRowSizeEvent, ! GridColumnSizeEvent, GridRangeSelectEvent, GridCellChangeEvent, |
From: Kevin A. <ka...@us...> - 2004-09-09 21:08:55
|
Update of /cvsroot/pythoncard/PythonCard/samples/simpleGrid In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8362/samples/simpleGrid Modified Files: simpleGrid.py Log Message: changed col to column since we are trying to avoid abbreviations Index: simpleGrid.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/simpleGrid/simpleGrid.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** simpleGrid.py 9 Sep 2004 20:04:24 -0000 1.11 --- simpleGrid.py 9 Sep 2004 21:08:46 -0000 1.12 *************** *** 127,132 **** event.skip() ! def on_mygrid_colSize(self, event): ! self.log.write("colSize: col %d, %s\n" % (event.GetRowOrCol(), event.position)) event.skip() --- 127,132 ---- event.skip() ! def on_mygrid_columnSize(self, event): ! self.log.write("columnSize: col %d, %s\n" % (event.GetRowOrCol(), event.position)) event.skip() |
From: Kevin A. <ka...@us...> - 2004-09-09 20:04:47
|
Update of /cvsroot/pythoncard/PythonCard/samples/simpleGrid In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27471/samples/simpleGrid Modified Files: simpleGrid.py Log Message: changed Right to Context, added row, column, position attributes Index: simpleGrid.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/simpleGrid/simpleGrid.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** simpleGrid.py 6 Sep 2004 01:16:30 -0000 1.10 --- simpleGrid.py 9 Sep 2004 20:04:24 -0000 1.11 *************** *** 6,10 **** """ ! from PythonCard import model import wx from wx import grid --- 6,10 ---- """ ! from PythonCard import dialog, model import wx from wx import grid *************** *** 17,21 **** self.moveTo = None ! wx.EVT_IDLE(self, self.OnIdle) mygrid = self.components.mygrid --- 17,21 ---- self.moveTo = None ! ## wx.EVT_IDLE(self, self.OnIdle) mygrid = self.components.mygrid *************** *** 71,99 **** mygrid.SetCellValue(11, 1, "This cell is set to span 3 rows and 3 columns"); - - - # test all the events - ## grid.EVT_GRID_CELL_LEFT_CLICK(self, self.OnCellLeftClick) - ## grid.EVT_GRID_CELL_RIGHT_CLICK(self, self.OnCellRightClick) - ## grid.EVT_GRID_CELL_LEFT_DCLICK(self, self.OnCellLeftDClick) - ## grid.EVT_GRID_CELL_RIGHT_DCLICK(self, self.OnCellRightDClick) - ## - ## grid.EVT_GRID_LABEL_LEFT_CLICK(self, self.OnLabelLeftClick) - ## grid.EVT_GRID_LABEL_RIGHT_CLICK(self, self.OnLabelRightClick) - ## grid.EVT_GRID_LABEL_LEFT_DCLICK(self, self.OnLabelLeftDClick) - ## grid.EVT_GRID_LABEL_RIGHT_DCLICK(self, self.OnLabelRightDClick) - - ## grid.EVT_GRID_ROW_SIZE(self, self.OnRowSize) - ## grid.EVT_GRID_COL_SIZE(self, self.OnColSize) - ## - ## grid.EVT_GRID_RANGE_SELECT(self, self.OnRangeSelect) - ## grid.EVT_GRID_CELL_CHANGE(self, self.OnCellChange) - ## grid.EVT_GRID_SELECT_CELL(self, self.OnSelectCell) - ## - ## grid.EVT_GRID_EDITOR_SHOWN(self, self.OnEditorShown) - ## grid.EVT_GRID_EDITOR_HIDDEN(self, self.OnEditorHidden) - ## grid.EVT_GRID_EDITOR_CREATED(self, self.OnEditorCreated) - - sizer1 = wx.BoxSizer(wx.VERTICAL) sizer1.Add(self.components.mygrid, 1, wx.EXPAND) --- 71,74 ---- *************** *** 107,170 **** ## def OnCellLeftClick(self, event): def on_mygrid_mouseClick(self, event): ! self.log.write("OnCellLeftClick: (%d,%d) %s\n" % ! (event.GetRow(), event.GetCol(), event.GetPosition())) ! event.Skip() ! def on_mygrid_mouseRightClick(self, event): ! self.log.write("OnCellRightClick: (%d,%d) %s\n" % ! (event.GetRow(), event.GetCol(), event.GetPosition())) ! event.Skip() def on_mygrid_mouseDoubleClick(self, event): ! self.log.write("OnCellLeftDClick: (%d,%d) %s\n" % ! (event.GetRow(), event.GetCol(), event.GetPosition())) ! event.Skip() ! def on_mygrid_mouseRightDoubleClick(self, event): ! self.log.write("OnCellRightDClick: (%d,%d) %s\n" % ! (event.GetRow(), event.GetCol(), event.GetPosition())) ! event.Skip() def on_mygrid_labelClick(self, event): ! self.log.write("OnLabelLeftClick: (%d,%d) %s\n" % ! (event.GetRow(), event.GetCol(), event.GetPosition())) ! event.Skip() ! def on_mygrid_labelRightClick(self, event): ! self.log.write("OnLabelRightClick: (%d,%d) %s\n" % ! (event.GetRow(), event.GetCol(), event.GetPosition())) ! event.Skip() def on_mygrid_labelDoubleClick(self, event): ! self.log.write("OnLabelLeftDClick: (%d,%d) %s\n" % ! (event.GetRow(), event.GetCol(), event.GetPosition())) ! event.Skip() ! def on_mygrid_labelRightDoubleClick(self, event): ! self.log.write("OnLabelRightDClick: (%d,%d) %s\n" % ! (event.GetRow(), event.GetCol(), event.GetPosition())) ! event.Skip() def on_mygrid_rowSize(self, event): ! self.log.write("OnRowSize: row %d, %s\n" % ! (event.GetRowOrCol(), event.GetPosition())) ! event.Skip() def on_mygrid_colSize(self, event): ! self.log.write("OnColSize: col %d, %s\n" % ! (event.GetRowOrCol(), event.GetPosition())) ! event.Skip() def on_mygrid_rangeSelect(self, event): if event.Selecting(): ! self.log.write("OnRangeSelect: top-left %s, bottom-right %s\n" % (event.GetTopLeftCoords(), event.GetBottomRightCoords())) ! event.Skip() def on_mygrid_cellChange(self, event): ! self.log.write("OnCellChange: (%d,%d) %s\n" % ! (event.GetRow(), event.GetCol(), event.GetPosition())) # Show how to stay in a cell that has bad data. We can't just --- 82,145 ---- ## def OnCellLeftClick(self, event): def on_mygrid_mouseClick(self, event): ! self.log.write("mouseClick: (%d,%d) %s\n" % ! (event.row, event.column, event.position)) ! event.skip() ! def on_mygrid_mouseContextClick(self, event): ! self.log.write("mouseContextClick: (%d,%d) %s\n" % ! (event.row, event.column, event.position)) ! event.skip() def on_mygrid_mouseDoubleClick(self, event): ! self.log.write("mouseDoubleClick: (%d,%d) %s\n" % ! (event.row, event.column, event.position)) ! event.skip() ! def on_mygrid_mouseContextDoubleClick(self, event): ! self.log.write("mouseContextDoubleClick: (%d,%d) %s\n" % ! (event.row, event.column, event.position)) ! event.skip() def on_mygrid_labelClick(self, event): ! self.log.write("labelClick: (%d,%d) %s\n" % ! (event.row, event.column, event.position)) ! event.skip() ! def on_mygrid_labelContextClick(self, event): ! self.log.write("labelContextClick: (%d,%d) %s\n" % ! (event.row, event.column, event.position)) ! event.skip() def on_mygrid_labelDoubleClick(self, event): ! self.log.write("labelDoubleClick: (%d,%d) %s\n" % ! (event.row, event.column, event.position)) ! event.skip() ! def on_mygrid_labelContextDoubleClick(self, event): ! self.log.write("labelContextDoubleClick: (%d,%d) %s\n" % ! (event.row, event.column, event.position)) ! event.skip() def on_mygrid_rowSize(self, event): ! self.log.write("rowSize: row %d, %s\n" % ! (event.GetRowOrCol(), event.position)) ! event.skip() def on_mygrid_colSize(self, event): ! self.log.write("colSize: col %d, %s\n" % ! (event.GetRowOrCol(), event.position)) ! event.skip() def on_mygrid_rangeSelect(self, event): if event.Selecting(): ! self.log.write("rangeSelect: top-left %s, bottom-right %s\n" % (event.GetTopLeftCoords(), event.GetBottomRightCoords())) ! event.skip() def on_mygrid_cellChange(self, event): ! self.log.write("cellChange: (%d,%d) %s\n" % ! (event.row, event.column, event.position)) # Show how to stay in a cell that has bad data. We can't just *************** *** 172,190 **** # won't have any effect. Instead, set coordinants to move to in # idle time. ! value = self.components.mygrid.GetCellValue(event.GetRow(), event.GetCol()) if value == 'no good': ! self.moveTo = event.GetRow(), event.GetCol() ! def OnIdle(self, event): if self.moveTo != None: self.components.mygrid.SetGridCursor(self.moveTo[0], self.moveTo[1]) self.moveTo = None ! event.Skip() def on_mygrid_selectCell(self, event): ! self.log.write("OnSelectCell: (%d,%d) %s\n" % ! (event.GetRow(), event.GetCol(), event.GetPosition())) # Another way to stay in a cell that has a bad value... --- 147,165 ---- # won't have any effect. Instead, set coordinants to move to in # idle time. ! value = self.components.mygrid.GetCellValue(event.row, event.column) if value == 'no good': ! self.moveTo = event.row, event.column ! def on_idle(self, event): if self.moveTo != None: self.components.mygrid.SetGridCursor(self.moveTo[0], self.moveTo[1]) self.moveTo = None ! event.skip() def on_mygrid_selectCell(self, event): ! self.log.write("selectCell: (%d,%d) %s\n" % ! (event.row, event.column, event.position)) # Another way to stay in a cell that has a bad value... *************** *** 198,206 **** if value == 'no good 2': return # cancels the cell selection ! event.Skip() def on_mygrid_editorShown(self, event): ! if event.GetRow() == 6 and event.GetCol() == 3: result = dialog.messageDialog(self, "Are you sure you wish to edit this cell?", "Checking", wx.YES_NO) --- 173,181 ---- if value == 'no good 2': return # cancels the cell selection ! event.skip() def on_mygrid_editorShown(self, event): ! if event.row == 6 and event.column == 3: result = dialog.messageDialog(self, "Are you sure you wish to edit this cell?", "Checking", wx.YES_NO) *************** *** 209,219 **** return ! self.log.write("OnEditorShown: (%d,%d) %s\n" % ! (event.GetRow(), event.GetCol(), event.GetPosition())) ! event.Skip() def on_mygrid_editorHidden(self, event): ! if event.GetRow() == 6 and event.GetCol() == 3: result = dialog.messageDialog(self, "Are you sure you wish to finish editing this cell?", "Checking", wx.YES_NO) --- 184,194 ---- return ! self.log.write("editorShown: (%d,%d) %s\n" % ! (event.row, event.column, event.position)) ! event.skip() def on_mygrid_editorHidden(self, event): ! if event.row == 6 and event.column == 3: result = dialog.messageDialog(self, "Are you sure you wish to finish editing this cell?", "Checking", wx.YES_NO) *************** *** 222,233 **** return ! self.log.write("OnEditorHidden: (%d,%d) %s\n" % ! (event.GetRow(), event.GetCol(), event.GetPosition())) ! event.Skip() def on_mygrid_editorCreated(self, event): ! self.log.write("OnEditorCreated: (%d, %d) %s\n" % ! (event.GetRow(), event.GetCol(), event.GetControl())) --- 197,208 ---- return ! self.log.write("on_mygrid_editorHidden: (%d,%d) %s\n" % ! (event.row, event.column, event.position)) ! event.skip() def on_mygrid_editorCreated(self, event): ! self.log.write("on_mygrid_editorCreated: (%d, %d) %s\n" % ! (event.row, event.column, event.GetControl())) |
From: Kevin A. <ka...@us...> - 2004-09-09 20:04:47
|
Update of /cvsroot/pythoncard/PythonCard/components In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27471/components Modified Files: grid.py Log Message: changed Right to Context, added row, column, position attributes Index: grid.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/components/grid.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** grid.py 6 Sep 2004 01:16:30 -0000 1.11 --- grid.py 9 Sep 2004 20:04:23 -0000 1.12 *************** *** 14,18 **** def decorate(self, aWxEvent, source): aWxEvent = event.Event.decorate(self, aWxEvent, source) ! # aWxEvent.item = aWxEvent.GetItem() return aWxEvent --- 14,23 ---- def decorate(self, aWxEvent, source): aWxEvent = event.Event.decorate(self, aWxEvent, source) ! try: ! aWxEvent.row = aWxEvent.GetRow() ! aWxEvent.column = aWxEvent.GetCol() ! aWxEvent.position = aWxEvent.GetPosition() ! except: ! pass return aWxEvent *************** *** 22,27 **** id = wx.grid.wxEVT_GRID_CELL_LEFT_CLICK ! class GridMouseRightClickEvent(GridEvent): ! name = 'mouseRightClick' binding = wx.grid.EVT_GRID_CELL_RIGHT_CLICK id = wx.grid.wxEVT_GRID_CELL_RIGHT_CLICK --- 27,32 ---- id = wx.grid.wxEVT_GRID_CELL_LEFT_CLICK ! class GridMouseContextClickEvent(GridEvent): ! name = 'mouseContextClick' binding = wx.grid.EVT_GRID_CELL_RIGHT_CLICK id = wx.grid.wxEVT_GRID_CELL_RIGHT_CLICK *************** *** 32,37 **** id = wx.grid.wxEVT_GRID_CELL_LEFT_DCLICK ! class GridMouseRightDoubleClickEvent(GridEvent): ! name = 'mouseRightDoubleClick' binding = wx.grid.EVT_GRID_CELL_RIGHT_DCLICK id = wx.grid.wxEVT_GRID_CELL_RIGHT_DCLICK --- 37,42 ---- id = wx.grid.wxEVT_GRID_CELL_LEFT_DCLICK ! class GridMouseContextDoubleClickEvent(GridEvent): ! name = 'mouseContextDoubleClick' binding = wx.grid.EVT_GRID_CELL_RIGHT_DCLICK id = wx.grid.wxEVT_GRID_CELL_RIGHT_DCLICK *************** *** 42,47 **** id = wx.grid.wxEVT_GRID_LABEL_LEFT_CLICK ! class GridLabelRightClickEvent(GridEvent): ! name = 'labelRightClick' binding = wx.grid.EVT_GRID_LABEL_RIGHT_CLICK id = wx.grid.wxEVT_GRID_LABEL_RIGHT_CLICK --- 47,52 ---- id = wx.grid.wxEVT_GRID_LABEL_LEFT_CLICK ! class GridLabelContextClickEvent(GridEvent): ! name = 'labelContextClick' binding = wx.grid.EVT_GRID_LABEL_RIGHT_CLICK id = wx.grid.wxEVT_GRID_LABEL_RIGHT_CLICK *************** *** 52,57 **** id = wx.grid.wxEVT_GRID_LABEL_LEFT_DCLICK ! class GridLabelRightDoubleClickEvent(GridEvent): ! name = 'labelRightDoubleClick' binding = wx.grid.EVT_GRID_LABEL_RIGHT_DCLICK id = wx.grid.wxEVT_GRID_LABEL_RIGHT_DCLICK --- 57,62 ---- id = wx.grid.wxEVT_GRID_LABEL_LEFT_DCLICK ! class GridLabelContextDoubleClickEvent(GridEvent): ! name = 'labelContextDoubleClick' binding = wx.grid.EVT_GRID_LABEL_RIGHT_DCLICK id = wx.grid.wxEVT_GRID_LABEL_RIGHT_DCLICK *************** *** 100,110 **** GridEvents = (#GridSelectEvent, GridMouseClickEvent, ! GridMouseRightClickEvent, GridMouseDoubleClickEvent, ! GridMouseRightDoubleClickEvent, GridLabelClickEvent, ! GridLabelRightClickEvent, GridLabelDoubleClickEvent, ! GridLabelRightDoubleClickEvent, GridRowSizeEvent, GridColSizeEvent, --- 105,115 ---- GridEvents = (#GridSelectEvent, GridMouseClickEvent, ! GridMouseContextClickEvent, GridMouseDoubleClickEvent, ! GridMouseContextDoubleClickEvent, GridLabelClickEvent, ! GridLabelContextClickEvent, GridLabelDoubleClickEvent, ! GridLabelContextDoubleClickEvent, GridRowSizeEvent, GridColSizeEvent, *************** *** 127,130 **** --- 132,139 ---- } widget.WidgetSpec.__init__( self, 'Grid', 'Widget', events, attributes ) + # might need to remove these events, not sure yet + #self._events.remove(event.MouseDoubleClickEvent) + #self._events.remove(event.MouseContextClickEvent) + #self._events.remove(event.MouseContextDoubleClickEvent) |
From: Alex T. <ale...@us...> - 2004-09-06 01:16:40
|
Update of /cvsroot/pythoncard/PythonCard/samples/simpleGrid In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13199/samples/simpleGrid Modified Files: simpleGrid.py Log Message: Wrap grid events. Adjust simpleGrid accordingly. Index: simpleGrid.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/simpleGrid/simpleGrid.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** simpleGrid.py 4 Sep 2004 03:51:51 -0000 1.9 --- simpleGrid.py 6 Sep 2004 01:16:30 -0000 1.10 *************** *** 74,97 **** # test all the events ! grid.EVT_GRID_CELL_LEFT_CLICK(self, self.OnCellLeftClick) ! grid.EVT_GRID_CELL_RIGHT_CLICK(self, self.OnCellRightClick) ! grid.EVT_GRID_CELL_LEFT_DCLICK(self, self.OnCellLeftDClick) ! grid.EVT_GRID_CELL_RIGHT_DCLICK(self, self.OnCellRightDClick) ! ! grid.EVT_GRID_LABEL_LEFT_CLICK(self, self.OnLabelLeftClick) ! grid.EVT_GRID_LABEL_RIGHT_CLICK(self, self.OnLabelRightClick) ! grid.EVT_GRID_LABEL_LEFT_DCLICK(self, self.OnLabelLeftDClick) ! grid.EVT_GRID_LABEL_RIGHT_DCLICK(self, self.OnLabelRightDClick) ! ! grid.EVT_GRID_ROW_SIZE(self, self.OnRowSize) ! grid.EVT_GRID_COL_SIZE(self, self.OnColSize) ! ! grid.EVT_GRID_RANGE_SELECT(self, self.OnRangeSelect) ! grid.EVT_GRID_CELL_CHANGE(self, self.OnCellChange) ! grid.EVT_GRID_SELECT_CELL(self, self.OnSelectCell) ! grid.EVT_GRID_EDITOR_SHOWN(self, self.OnEditorShown) ! grid.EVT_GRID_EDITOR_HIDDEN(self, self.OnEditorHidden) ! grid.EVT_GRID_EDITOR_CREATED(self, self.OnEditorCreated) --- 74,97 ---- # test all the events ! ## grid.EVT_GRID_CELL_LEFT_CLICK(self, self.OnCellLeftClick) ! ## grid.EVT_GRID_CELL_RIGHT_CLICK(self, self.OnCellRightClick) ! ## grid.EVT_GRID_CELL_LEFT_DCLICK(self, self.OnCellLeftDClick) ! ## grid.EVT_GRID_CELL_RIGHT_DCLICK(self, self.OnCellRightDClick) ! ## ! ## grid.EVT_GRID_LABEL_LEFT_CLICK(self, self.OnLabelLeftClick) ! ## grid.EVT_GRID_LABEL_RIGHT_CLICK(self, self.OnLabelRightClick) ! ## grid.EVT_GRID_LABEL_LEFT_DCLICK(self, self.OnLabelLeftDClick) ! ## grid.EVT_GRID_LABEL_RIGHT_DCLICK(self, self.OnLabelRightDClick) ! ## grid.EVT_GRID_ROW_SIZE(self, self.OnRowSize) ! ## grid.EVT_GRID_COL_SIZE(self, self.OnColSize) ! ## ! ## grid.EVT_GRID_RANGE_SELECT(self, self.OnRangeSelect) ! ## grid.EVT_GRID_CELL_CHANGE(self, self.OnCellChange) ! ## grid.EVT_GRID_SELECT_CELL(self, self.OnSelectCell) ! ## ! ## grid.EVT_GRID_EDITOR_SHOWN(self, self.OnEditorShown) ! ## grid.EVT_GRID_EDITOR_HIDDEN(self, self.OnEditorHidden) ! ## grid.EVT_GRID_EDITOR_CREATED(self, self.OnEditorCreated) *************** *** 105,144 **** self.panel.Layout() ! def OnCellLeftClick(self, event): self.log.write("OnCellLeftClick: (%d,%d) %s\n" % (event.GetRow(), event.GetCol(), event.GetPosition())) event.Skip() ! def OnCellRightClick(self, event): self.log.write("OnCellRightClick: (%d,%d) %s\n" % (event.GetRow(), event.GetCol(), event.GetPosition())) event.Skip() ! def OnCellLeftDClick(self, event): self.log.write("OnCellLeftDClick: (%d,%d) %s\n" % (event.GetRow(), event.GetCol(), event.GetPosition())) event.Skip() ! def OnCellRightDClick(self, event): self.log.write("OnCellRightDClick: (%d,%d) %s\n" % (event.GetRow(), event.GetCol(), event.GetPosition())) event.Skip() ! def OnLabelLeftClick(self, event): self.log.write("OnLabelLeftClick: (%d,%d) %s\n" % (event.GetRow(), event.GetCol(), event.GetPosition())) event.Skip() ! def OnLabelRightClick(self, event): self.log.write("OnLabelRightClick: (%d,%d) %s\n" % (event.GetRow(), event.GetCol(), event.GetPosition())) event.Skip() ! def OnLabelLeftDClick(self, event): self.log.write("OnLabelLeftDClick: (%d,%d) %s\n" % (event.GetRow(), event.GetCol(), event.GetPosition())) event.Skip() ! def OnLabelRightDClick(self, event): self.log.write("OnLabelRightDClick: (%d,%d) %s\n" % (event.GetRow(), event.GetCol(), event.GetPosition())) --- 105,145 ---- self.panel.Layout() ! ## def OnCellLeftClick(self, event): ! def on_mygrid_mouseClick(self, event): self.log.write("OnCellLeftClick: (%d,%d) %s\n" % (event.GetRow(), event.GetCol(), event.GetPosition())) event.Skip() ! def on_mygrid_mouseRightClick(self, event): self.log.write("OnCellRightClick: (%d,%d) %s\n" % (event.GetRow(), event.GetCol(), event.GetPosition())) event.Skip() ! def on_mygrid_mouseDoubleClick(self, event): self.log.write("OnCellLeftDClick: (%d,%d) %s\n" % (event.GetRow(), event.GetCol(), event.GetPosition())) event.Skip() ! def on_mygrid_mouseRightDoubleClick(self, event): self.log.write("OnCellRightDClick: (%d,%d) %s\n" % (event.GetRow(), event.GetCol(), event.GetPosition())) event.Skip() ! def on_mygrid_labelClick(self, event): self.log.write("OnLabelLeftClick: (%d,%d) %s\n" % (event.GetRow(), event.GetCol(), event.GetPosition())) event.Skip() ! def on_mygrid_labelRightClick(self, event): self.log.write("OnLabelRightClick: (%d,%d) %s\n" % (event.GetRow(), event.GetCol(), event.GetPosition())) event.Skip() ! def on_mygrid_labelDoubleClick(self, event): self.log.write("OnLabelLeftDClick: (%d,%d) %s\n" % (event.GetRow(), event.GetCol(), event.GetPosition())) event.Skip() ! def on_mygrid_labelRightDoubleClick(self, event): self.log.write("OnLabelRightDClick: (%d,%d) %s\n" % (event.GetRow(), event.GetCol(), event.GetPosition())) *************** *** 146,160 **** ! def OnRowSize(self, event): self.log.write("OnRowSize: row %d, %s\n" % (event.GetRowOrCol(), event.GetPosition())) event.Skip() ! def OnColSize(self, event): self.log.write("OnColSize: col %d, %s\n" % (event.GetRowOrCol(), event.GetPosition())) event.Skip() ! def OnRangeSelect(self, event): if event.Selecting(): self.log.write("OnRangeSelect: top-left %s, bottom-right %s\n" % --- 147,161 ---- ! def on_mygrid_rowSize(self, event): self.log.write("OnRowSize: row %d, %s\n" % (event.GetRowOrCol(), event.GetPosition())) event.Skip() ! def on_mygrid_colSize(self, event): self.log.write("OnColSize: col %d, %s\n" % (event.GetRowOrCol(), event.GetPosition())) event.Skip() ! def on_mygrid_rangeSelect(self, event): if event.Selecting(): self.log.write("OnRangeSelect: top-left %s, bottom-right %s\n" % *************** *** 163,167 **** ! def OnCellChange(self, event): self.log.write("OnCellChange: (%d,%d) %s\n" % (event.GetRow(), event.GetCol(), event.GetPosition())) --- 164,168 ---- ! def on_mygrid_cellChange(self, event): self.log.write("OnCellChange: (%d,%d) %s\n" % (event.GetRow(), event.GetCol(), event.GetPosition())) *************** *** 183,187 **** ! def OnSelectCell(self, event): self.log.write("OnSelectCell: (%d,%d) %s\n" % (event.GetRow(), event.GetCol(), event.GetPosition())) --- 184,188 ---- ! def on_mygrid_selectCell(self, event): self.log.write("OnSelectCell: (%d,%d) %s\n" % (event.GetRow(), event.GetCol(), event.GetPosition())) *************** *** 200,209 **** ! def OnEditorShown(self, event): ! if event.GetRow() == 6 and event.GetCol() == 3 and \ ! wx.MessageBox("Are you sure you wish to edit this cell?", ! "Checking", wxYES_NO) == wxNO: ! event.Veto() ! return self.log.write("OnEditorShown: (%d,%d) %s\n" % --- 201,211 ---- ! def on_mygrid_editorShown(self, event): ! if event.GetRow() == 6 and event.GetCol() == 3: ! result = dialog.messageDialog(self, "Are you sure you wish to edit this cell?", ! "Checking", wx.YES_NO) ! if not result.accepted: ! event.Veto() ! return self.log.write("OnEditorShown: (%d,%d) %s\n" % *************** *** 212,221 **** ! def OnEditorHidden(self, event): ! if event.GetRow() == 6 and event.GetCol() == 3 and \ ! wx.MessageBox("Are you sure you wish to finish editing this cell?", ! "Checking", wx.YES_NO) == wx.NO: ! event.Veto() ! return self.log.write("OnEditorHidden: (%d,%d) %s\n" % --- 214,224 ---- ! def on_mygrid_editorHidden(self, event): ! if event.GetRow() == 6 and event.GetCol() == 3: ! result = dialog.messageDialog(self, "Are you sure you wish to finish editing this cell?", ! "Checking", wx.YES_NO) ! if not result.accepted: ! event.Veto() ! return self.log.write("OnEditorHidden: (%d,%d) %s\n" % *************** *** 224,228 **** ! def OnEditorCreated(self, event): self.log.write("OnEditorCreated: (%d, %d) %s\n" % (event.GetRow(), event.GetCol(), event.GetControl())) --- 227,231 ---- ! def on_mygrid_editorCreated(self, event): self.log.write("OnEditorCreated: (%d, %d) %s\n" % (event.GetRow(), event.GetCol(), event.GetControl())) |
From: Alex T. <ale...@us...> - 2004-09-06 01:16:39
|
Update of /cvsroot/pythoncard/PythonCard/components In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13199/components Modified Files: grid.py Log Message: Wrap grid events. Adjust simpleGrid accordingly. Index: grid.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/components/grid.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** grid.py 13 May 2004 02:40:24 -0000 1.10 --- grid.py 6 Sep 2004 01:16:30 -0000 1.11 *************** *** 9,25 **** from PythonCard import event, widget class GridSpec(widget.WidgetSpec): def __init__(self): ! events = [] ! """ ! self.events.extend([event.SelectEvent, ! event.ItemActivatedEvent, ! event.ItemExpandedEvent, ! event.ItemExpandingEvent, ! event.SelectionChangedEvent, ! event.SelectionChangingEvent, ! event.KeyDownEvent ! ]) ! """ attributes = { 'size' : { 'presence' : 'optional', 'default' : [ 50, 50 ] }, --- 9,124 ---- from PythonCard import event, widget + + + class GridEvent(event.Event): + def decorate(self, aWxEvent, source): + aWxEvent = event.Event.decorate(self, aWxEvent, source) + # aWxEvent.item = aWxEvent.GetItem() + return aWxEvent + + class GridMouseClickEvent(GridEvent): + name = 'mouseClick' + binding = wx.grid.EVT_GRID_CELL_LEFT_CLICK + id = wx.grid.wxEVT_GRID_CELL_LEFT_CLICK + + class GridMouseRightClickEvent(GridEvent): + name = 'mouseRightClick' + binding = wx.grid.EVT_GRID_CELL_RIGHT_CLICK + id = wx.grid.wxEVT_GRID_CELL_RIGHT_CLICK + + class GridMouseDoubleClickEvent(GridEvent): + name = 'mouseDoubleClick' + binding = wx.grid.EVT_GRID_CELL_LEFT_DCLICK + id = wx.grid.wxEVT_GRID_CELL_LEFT_DCLICK + + class GridMouseRightDoubleClickEvent(GridEvent): + name = 'mouseRightDoubleClick' + binding = wx.grid.EVT_GRID_CELL_RIGHT_DCLICK + id = wx.grid.wxEVT_GRID_CELL_RIGHT_DCLICK + + class GridLabelClickEvent(GridEvent): + name = 'labelClick' + binding = wx.grid.EVT_GRID_LABEL_LEFT_CLICK + id = wx.grid.wxEVT_GRID_LABEL_LEFT_CLICK + + class GridLabelRightClickEvent(GridEvent): + name = 'labelRightClick' + binding = wx.grid.EVT_GRID_LABEL_RIGHT_CLICK + id = wx.grid.wxEVT_GRID_LABEL_RIGHT_CLICK + + class GridLabelDoubleClickEvent(GridEvent): + name = 'labelDoubleClick' + binding = wx.grid.EVT_GRID_LABEL_LEFT_DCLICK + id = wx.grid.wxEVT_GRID_LABEL_LEFT_DCLICK + + class GridLabelRightDoubleClickEvent(GridEvent): + name = 'labelRightDoubleClick' + binding = wx.grid.EVT_GRID_LABEL_RIGHT_DCLICK + id = wx.grid.wxEVT_GRID_LABEL_RIGHT_DCLICK + + class GridRowSizeEvent(GridEvent): + name = 'rowSize' + binding = wx.grid.EVT_GRID_ROW_SIZE + id = wx.grid.wxEVT_GRID_ROW_SIZE + + class GridColSizeEvent(GridEvent): + name = 'colSize' + binding = wx.grid.EVT_GRID_COL_SIZE + id = wx.grid.wxEVT_GRID_COL_SIZE + + class GridRangeSelectEvent(GridEvent): + name = 'rangeSelect' + binding = wx.grid.EVT_GRID_RANGE_SELECT + id = wx.grid.wxEVT_GRID_RANGE_SELECT + + class GridCellChangeEvent(GridEvent): + name = 'cellChange' + binding = wx.grid.EVT_GRID_CELL_CHANGE + id = wx.grid.wxEVT_GRID_CELL_CHANGE + + class GridSelectCellEvent(GridEvent): + name = 'selectCell' + binding = wx.grid.EVT_GRID_SELECT_CELL + id = wx.grid.wxEVT_GRID_SELECT_CELL + + class GridEditorShownEvent(GridEvent): + name = 'editorShown' + binding = wx.grid.EVT_GRID_EDITOR_SHOWN + id = wx.grid.wxEVT_GRID_EDITOR_SHOWN + + class GridEditorHiddenEvent(GridEvent): + name = 'editorHidden' + binding = wx.grid.EVT_GRID_EDITOR_HIDDEN + id = wx.grid.wxEVT_GRID_EDITOR_HIDDEN + + class GridEditorCreatedEvent(GridEvent): + name = 'editorCreated' + binding = wx.grid.EVT_GRID_EDITOR_CREATED + id = wx.grid.wxEVT_GRID_EDITOR_CREATED + + + GridEvents = (#GridSelectEvent, + GridMouseClickEvent, + GridMouseRightClickEvent, + GridMouseDoubleClickEvent, + GridMouseRightDoubleClickEvent, + GridLabelClickEvent, + GridLabelRightClickEvent, + GridLabelDoubleClickEvent, + GridLabelRightDoubleClickEvent, + GridRowSizeEvent, + GridColSizeEvent, + GridRangeSelectEvent, + GridCellChangeEvent, + GridSelectCellEvent, + GridEditorShownEvent, + GridEditorHiddenEvent, + GridEditorCreatedEvent, + ) + class GridSpec(widget.WidgetSpec): def __init__(self): ! events = list(GridEvents) ! attributes = { 'size' : { 'presence' : 'optional', 'default' : [ 50, 50 ] }, *************** *** 51,55 **** widget.Widget.__init__(self, aParent, aResource) ! self._bindEvents(event.WIDGET_EVENTS) --- 150,155 ---- widget.Widget.__init__(self, aParent, aResource) ! ## self._bindEvents(event.WIDGET_EVENTS) ! self._bindEvents(self._spec._events) |
From: Alex T. <ale...@us...> - 2004-09-04 23:50:16
|
Update of /cvsroot/pythoncard/PythonCard/samples/dbBrowser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17287 Added Files: testfile.csv Log Message: Add a sample .csv file for the dbBrowser sample. --- NEW FILE: testfile.csv --- Item,Weight,Cost/Unit,Units,Cost Oranges,.30,$0.25,7,$1.75 Pears,0.10,$0.27,3,$0.81 Apples,0.20,$0.31,10,$3.10 Pineapple,2.00,$1.05,2,$2.10 Kiwi,0.05,$0.37,12,$4.44 Banana,0.07,$0.10,6,$0.60 |
From: Kevin A. <ka...@us...> - 2004-09-04 23:14:02
|
Update of /cvsroot/pythoncard/PythonCard/samples/pysshed In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11178/samples/pysshed Modified Files: pysshed.py Log Message: added missing module imports to pysshed new workaround for "cleanly" removing extra event classes from spec Index: pysshed.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/pysshed/pysshed.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** pysshed.py 4 Sep 2004 22:47:22 -0000 1.13 --- pysshed.py 4 Sep 2004 23:13:40 -0000 1.14 *************** *** 36,40 **** import os, sys import wx ! from PythonCard import model import ConfigParser import customDialogs --- 36,40 ---- import os, sys import wx ! from PythonCard import dialog, model import ConfigParser import customDialogs |
From: Kevin A. <ka...@us...> - 2004-09-04 23:13:50
|
Update of /cvsroot/pythoncard/PythonCard/components In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11178/components Modified Files: list.py Log Message: added missing module imports to pysshed new workaround for "cleanly" removing extra event classes from spec Index: list.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/components/list.py,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** list.py 26 Aug 2004 23:25:06 -0000 1.27 --- list.py 4 Sep 2004 23:13:39 -0000 1.28 *************** *** 55,58 **** --- 55,63 ---- } widget.WidgetSpec.__init__( self, 'List', 'Widget', events, attributes ) + # KEA 2004-09-04 + # this isn't particularly clean, but it does remove the extra event class + # and since events unlike attributes don't get any further processing + # in the spec this should be okay + self._events.remove(event.MouseDoubleClickEvent) *************** *** 81,89 **** self._setStringSelection(aResource.stringSelection) ! # need to remove MouseDoubleClickEvent ! # since ListMouseDoubleClickEvent is used instead ! temp = list(event.WIDGET_EVENTS + ListEvents) ! temp.remove(event.MouseDoubleClickEvent) ! self._bindEvents(tuple(temp)) def _getItems(self): --- 86,90 ---- self._setStringSelection(aResource.stringSelection) ! self._bindEvents(self._spec._events) def _getItems(self): |
From: Kevin A. <ka...@us...> - 2004-09-04 22:47:33
|
Update of /cvsroot/pythoncard/PythonCard/samples/pysshed In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6858/samples/pysshed Modified Files: pysshed.py Log Message: converted import * Index: pysshed.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/pysshed/pysshed.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** pysshed.py 16 Aug 2004 21:45:00 -0000 1.12 --- pysshed.py 4 Sep 2004 22:47:22 -0000 1.13 *************** *** 38,42 **** from PythonCard import model import ConfigParser ! from customDialogs import * # pwd only exists on *NIX --- 38,42 ---- from PythonCard import model import ConfigParser ! import customDialogs # pwd only exists on *NIX *************** *** 61,65 **** txt += 'in "%s". Click OK to begin configuring PySSHed.' % CONFIG_FILE ! bull = dialog.alertDialog(self, wrap_string(txt, 70), title) self.cfg.add_section('Defaults') --- 61,65 ---- txt += 'in "%s". Click OK to begin configuring PySSHed.' % CONFIG_FILE ! bull = dialog.alertDialog(self, customDialogs.wrap_string(txt, 70), title) self.cfg.add_section('Defaults') *************** *** 76,80 **** self.cfg.set('Defaults', 'command', '"C:\\Program files\\putty\\putty.exe"') ! dlg = prefsDialog(self, 'Defaults') if dlg.ShowModal() == wx.ID_OK: fd = open(CONFIG_FILE, 'w') --- 76,80 ---- self.cfg.set('Defaults', 'command', '"C:\\Program files\\putty\\putty.exe"') ! dlg = customDialogs.prefsDialog(self, 'Defaults') if dlg.ShowModal() == wx.ID_OK: fd = open(CONFIG_FILE, 'w') *************** *** 121,125 **** self.cfg.set('NewSession', 'identityfile', self.cfg.get('Defaults', 'identityfile')) self.cfg.set('NewSession', 'command', self.cfg.get('Defaults', 'command')) ! dlg = prefsDialog(self, 'NewSession') if dlg.ShowModal() == wx.ID_OK: bull = self.cfg.remove_section('NewSession') --- 121,125 ---- self.cfg.set('NewSession', 'identityfile', self.cfg.get('Defaults', 'identityfile')) self.cfg.set('NewSession', 'command', self.cfg.get('Defaults', 'command')) ! dlg = customDialogs.prefsDialog(self, 'NewSession') if dlg.ShowModal() == wx.ID_OK: bull = self.cfg.remove_section('NewSession') *************** *** 141,145 **** section = self.components.sessionList.stringSelection if section != '': ! dlg = prefsDialog(self, self.components.sessionList.stringSelection) if dlg.ShowModal() == wx.ID_OK: fd = open(CONFIG_FILE, 'w') --- 141,145 ---- section = self.components.sessionList.stringSelection if section != '': ! dlg = customDialogs.prefsDialog(self, self.components.sessionList.stringSelection) if dlg.ShowModal() == wx.ID_OK: fd = open(CONFIG_FILE, 'w') *************** *** 163,167 **** def on_helpAbout_command(self, event): ! dlg = HTMLHelp(self) dlg.showModal() dlg.destroy() --- 163,167 ---- def on_helpAbout_command(self, event): ! dlg = customDialogs.HTMLHelp(self) dlg.showModal() dlg.destroy() |
From: Kevin A. <ka...@us...> - 2004-09-04 22:47:33
|
Update of /cvsroot/pythoncard/PythonCard/tools/codeEditor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6858/tools/codeEditor Modified Files: codeEditorR.py Log Message: converted import * Index: codeEditorR.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/codeEditor/codeEditorR.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** codeEditorR.py 10 May 2004 05:02:48 -0000 1.11 --- codeEditorR.py 4 Sep 2004 22:47:23 -0000 1.12 *************** *** 13,21 **** """ ! from codeEditor import * - # KEA 2003-01-06 - # resource file support - from PythonCard import registry def getResourceFilename(path): --- 13,21 ---- """ ! import os ! import wx ! from PythonCard import model, registry, resource ! import codeEditor def getResourceFilename(path): *************** *** 38,42 **** ! class CodeEditorR(CodeEditor): def initSizers(self): --- 38,42 ---- ! class CodeEditorR(codeEditor.CodeEditor): def initSizers(self): |
From: Kevin A. <ka...@us...> - 2004-09-04 22:47:32
|
Update of /cvsroot/pythoncard/PythonCard/samples/dbBrowser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6858/samples/dbBrowser Modified Files: dbTable.py Log Message: converted import * Index: dbTable.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/dbBrowser/dbTable.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** dbTable.py 19 Aug 2004 15:41:40 -0000 1.5 --- dbTable.py 4 Sep 2004 22:47:22 -0000 1.6 *************** *** 1,4 **** ! from wx.grid import * ! class DBTable(PyGridTableBase): """Class to wrap a database table that can be assigned to a grid --- 1,5 ---- ! from wx import grid ! ! class DBTable(grid.PyGridTableBase): """Class to wrap a database table that can be assigned to a grid *************** *** 6,10 **** """ def __init__(self, db, tableName): ! PyGridTableBase.__init__(self) self.__db=db self.tableName=tableName --- 7,11 ---- """ def __init__(self, db, tableName): ! grid.PyGridTableBase.__init__(self) self.__db=db self.tableName=tableName |
From: Alex T. <ale...@us...> - 2004-09-04 11:46:55
|
Update of /cvsroot/pythoncard/PythonCard/samples/dbBrowser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23821/samples/dbBrowser Modified Files: dbLogin.py dbLogin.rsrc.py Added Files: csvBrowse.py Log Message: Added support for CSV files in dbBrowser sample. --- NEW FILE: csvBrowse.py --- #!/usr/bin/python __version__="$Revision $"[11:-2] __date__="$Date $" __author__="Andy Todd <an...@ha...>" """ Module Name: csvBrowse Description: Plug in for PythonCard application dbBrowse to provide simple CSV functionality Constant/configuration values are currently maintained in the source code. If we are to optimise this application they should be split into seperate configuration files (as per PythonCard/Webware style guidelines) The structure of this module should be replicated for different RDBMS so that they can be interchanged by dbBrowse - hopefully. """ import csv, os class browse: # Connection should be a dictionary with at least two keys, # 'databasename' and 'directory' # This is wildly different to other database modules def __init__(self, connection): "Setup the database connection" self._system_tables=[] try: name = os.path.join(connection["directory"], connection["databasename"]) self.reader = csv.reader(file(name, "rb")) self.headers = self.reader.next() self._db = "ok" self._cursor="ok" except: self._db = None self._cursor = None # This one is used in getRow self._tableName='TheOnlyTable' def getTables(self): "Return a list of all of the non-system tables in <database>" return [ "TheOnlyTable" ] def getColumns(self, tableName): "Get the definition of the columns in tableName" # format of dbBrowser column definitions is # column name, data type, length (for display), nullable, key, default columnDefs = [] for column in self.headers: columnName = column dataType, nullable, key, default = "varchar", "", "", "" # Dodgy default, but it works for me precision = 255 columnDefs.append((columnName, dataType, precision, nullable, key, default)) return columnDefs def getQueryString(self, tableName): "Return a SQL statement which queries all of the columns in tableName" # only used internally, not needed for csv files return "" def getRow(self, tableName): "Get a row from tableName" if tableName!=self._tableName: self._tableName=tableName try: result = self.reader.next() except: result = None return result def getRows(self, tableName): "Get all of the rows from tableName" if tableName!=self._tableName: self._tableName=tableName result = [] for row in self.reader: result.append(row) return result if __name__ == '__main__': # We are in an interactive session so run our test routines # Connect to the database connection={ 'databasename':'testfile.csv' ,'directory':'.'} dbHolder = browse(connection) # Return all of our table names into user_tables user_tables = dbHolder.getTables() # Print out the structure of each table and its first row print "--------------------------------------------------" for table in user_tables: print dbHolder.getQueryString(table) print dbHolder.getRow(table) print "--------------------------------------------------" Index: dbLogin.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/dbBrowser/dbLogin.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** dbLogin.py 12 Aug 2004 19:18:50 -0000 1.10 --- dbLogin.py 4 Sep 2004 11:46:39 -0000 1.11 *************** *** 18,22 **** ,'MetaKit': 'metakitBrowse' ,'PySQLite': 'pysqliteBrowse' ! ,'PostgreSQL': 'postgreBrowse'} class dbLogin(model.CustomDialog): --- 18,23 ---- ,'MetaKit': 'metakitBrowse' ,'PySQLite': 'pysqliteBrowse' ! ,'PostgreSQL': 'postgreBrowse' ! ,'CSV': 'csvBrowse' } class dbLogin(model.CustomDialog): *************** *** 44,47 **** --- 45,51 ---- self.parent.connection={'databasename':self.components["txtUsername"].text, 'directory':self.components["txtPassword"].text} + elif self.components.choice.stringSelection == 'CSV': + self.parent.connection={'databasename':self.components["txtUsername"].text, + 'directory':self.components["txtPassword"].text} else: self.parent.connection={'username':self.components["txtUsername"].text, *************** *** 70,73 **** --- 74,81 ---- wildcard = wildcard = "Gadfly files (*.gfd)|*.gfd" result = dialog.openFileDialog(wildcard=wildcard) + elif self.components.choice.stringSelection == 'CSV': + wildcard = "CSV files (*.csv)|*.csv" + ## wildcard = "*.csv" + result = dialog.openFileDialog(wildcard=wildcard) else: result = dialog.openFileDialog() *************** *** 87,90 **** --- 95,104 ---- self.components.txtDatabase.visible = False self.components.btnFile.visible = True + elif self.components.choice.stringSelection in ('CSV'): + self.components.lblUsername.text = "File" + self.components.lblPassword.text = "Directory" + self.components.lblDatabase.visible = False + self.components.txtDatabase.visible = False + self.components.btnFile.visible = True else: self.components.lblUsername.text = 'Username' Index: dbLogin.rsrc.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/dbBrowser/dbLogin.rsrc.py,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** dbLogin.rsrc.py 22 Apr 2004 16:42:42 -0000 1.14 --- dbLogin.rsrc.py 4 Sep 2004 11:46:39 -0000 1.15 *************** *** 15,19 **** 'name':'choice', 'position':(110, 0), ! 'items':['MySQL', 'Oracle', 'Gadfly', 'MetaKit', 'PySQLite', 'PostgreSQL'], 'stringSelection':'MySQL', }, --- 15,19 ---- 'name':'choice', 'position':(110, 0), ! 'items':['MySQL', 'Oracle', 'Gadfly', 'MetaKit', 'PySQLite', 'PostgreSQL', 'CSV'], 'stringSelection':'MySQL', }, |
From: Alex T. <ale...@us...> - 2004-09-04 11:46:54
|
Update of /cvsroot/pythoncard/PythonCard/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23821/docs Modified Files: changelog.txt Log Message: Added support for CSV files in dbBrowser sample. Index: changelog.txt =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/docs/changelog.txt,v retrieving revision 1.304 retrieving revision 1.305 diff -C2 -d -r1.304 -r1.305 *** changelog.txt 24 Aug 2004 19:01:16 -0000 1.304 --- changelog.txt 4 Sep 2004 11:46:39 -0000 1.305 *************** *** 6,10 **** added colorFromString to util.py added main_is_frozen workaround for bundlebuilder standalones on Mac ! --- 6,10 ---- added colorFromString to util.py added main_is_frozen workaround for bundlebuilder standalones on Mac ! added csv support to dbBrowser sample |
From: Kevin A. <ka...@us...> - 2004-09-04 03:52:11
|
Update of /cvsroot/pythoncard/PythonCard/samples/simpleGrid In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28970/samples/simpleGrid Modified Files: simpleGrid.py Log Message: replaced skip() with uppercase Skip() for raw wxPython events Index: simpleGrid.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/simpleGrid/simpleGrid.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** simpleGrid.py 5 May 2004 16:53:46 -0000 1.8 --- simpleGrid.py 4 Sep 2004 03:51:51 -0000 1.9 *************** *** 108,147 **** self.log.write("OnCellLeftClick: (%d,%d) %s\n" % (event.GetRow(), event.GetCol(), event.GetPosition())) ! event.skip() def OnCellRightClick(self, event): self.log.write("OnCellRightClick: (%d,%d) %s\n" % (event.GetRow(), event.GetCol(), event.GetPosition())) ! event.skip() def OnCellLeftDClick(self, event): self.log.write("OnCellLeftDClick: (%d,%d) %s\n" % (event.GetRow(), event.GetCol(), event.GetPosition())) ! event.skip() def OnCellRightDClick(self, event): self.log.write("OnCellRightDClick: (%d,%d) %s\n" % (event.GetRow(), event.GetCol(), event.GetPosition())) ! event.skip() def OnLabelLeftClick(self, event): self.log.write("OnLabelLeftClick: (%d,%d) %s\n" % (event.GetRow(), event.GetCol(), event.GetPosition())) ! event.skip() def OnLabelRightClick(self, event): self.log.write("OnLabelRightClick: (%d,%d) %s\n" % (event.GetRow(), event.GetCol(), event.GetPosition())) ! event.skip() def OnLabelLeftDClick(self, event): self.log.write("OnLabelLeftDClick: (%d,%d) %s\n" % (event.GetRow(), event.GetCol(), event.GetPosition())) ! event.skip() def OnLabelRightDClick(self, event): self.log.write("OnLabelRightDClick: (%d,%d) %s\n" % (event.GetRow(), event.GetCol(), event.GetPosition())) ! event.skip() --- 108,147 ---- self.log.write("OnCellLeftClick: (%d,%d) %s\n" % (event.GetRow(), event.GetCol(), event.GetPosition())) ! event.Skip() def OnCellRightClick(self, event): self.log.write("OnCellRightClick: (%d,%d) %s\n" % (event.GetRow(), event.GetCol(), event.GetPosition())) ! event.Skip() def OnCellLeftDClick(self, event): self.log.write("OnCellLeftDClick: (%d,%d) %s\n" % (event.GetRow(), event.GetCol(), event.GetPosition())) ! event.Skip() def OnCellRightDClick(self, event): self.log.write("OnCellRightDClick: (%d,%d) %s\n" % (event.GetRow(), event.GetCol(), event.GetPosition())) ! event.Skip() def OnLabelLeftClick(self, event): self.log.write("OnLabelLeftClick: (%d,%d) %s\n" % (event.GetRow(), event.GetCol(), event.GetPosition())) ! event.Skip() def OnLabelRightClick(self, event): self.log.write("OnLabelRightClick: (%d,%d) %s\n" % (event.GetRow(), event.GetCol(), event.GetPosition())) ! event.Skip() def OnLabelLeftDClick(self, event): self.log.write("OnLabelLeftDClick: (%d,%d) %s\n" % (event.GetRow(), event.GetCol(), event.GetPosition())) ! event.Skip() def OnLabelRightDClick(self, event): self.log.write("OnLabelRightDClick: (%d,%d) %s\n" % (event.GetRow(), event.GetCol(), event.GetPosition())) ! event.Skip() *************** *** 149,158 **** self.log.write("OnRowSize: row %d, %s\n" % (event.GetRowOrCol(), event.GetPosition())) ! event.skip() def OnColSize(self, event): self.log.write("OnColSize: col %d, %s\n" % (event.GetRowOrCol(), event.GetPosition())) ! event.skip() def OnRangeSelect(self, event): --- 149,158 ---- self.log.write("OnRowSize: row %d, %s\n" % (event.GetRowOrCol(), event.GetPosition())) ! event.Skip() def OnColSize(self, event): self.log.write("OnColSize: col %d, %s\n" % (event.GetRowOrCol(), event.GetPosition())) ! event.Skip() def OnRangeSelect(self, event): *************** *** 160,164 **** self.log.write("OnRangeSelect: top-left %s, bottom-right %s\n" % (event.GetTopLeftCoords(), event.GetBottomRightCoords())) ! event.skip() --- 160,164 ---- self.log.write("OnRangeSelect: top-left %s, bottom-right %s\n" % (event.GetTopLeftCoords(), event.GetBottomRightCoords())) ! event.Skip() *************** *** 180,184 **** self.components.mygrid.SetGridCursor(self.moveTo[0], self.moveTo[1]) self.moveTo = None ! event.skip() --- 180,184 ---- self.components.mygrid.SetGridCursor(self.moveTo[0], self.moveTo[1]) self.moveTo = None ! event.Skip() *************** *** 197,201 **** if value == 'no good 2': return # cancels the cell selection ! event.skip() --- 197,201 ---- if value == 'no good 2': return # cancels the cell selection ! event.Skip() *************** *** 209,213 **** self.log.write("OnEditorShown: (%d,%d) %s\n" % (event.GetRow(), event.GetCol(), event.GetPosition())) ! event.skip() --- 209,213 ---- self.log.write("OnEditorShown: (%d,%d) %s\n" % (event.GetRow(), event.GetCol(), event.GetPosition())) ! event.Skip() *************** *** 221,225 **** self.log.write("OnEditorHidden: (%d,%d) %s\n" % (event.GetRow(), event.GetCol(), event.GetPosition())) ! event.skip() --- 221,225 ---- self.log.write("OnEditorHidden: (%d,%d) %s\n" % (event.GetRow(), event.GetCol(), event.GetPosition())) ! event.Skip() |
From: Kevin A. <ka...@us...> - 2004-08-30 14:50:30
|
Update of /cvsroot/pythoncard/PythonCard/samples/moderator In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14090/samples/moderator Modified Files: moderator.py Log Message: converted wx.Timer references to timer.Timer and fixed case of methods Index: moderator.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/moderator/moderator.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** moderator.py 15 Aug 2004 17:34:56 -0000 1.7 --- moderator.py 30 Aug 2004 14:49:51 -0000 1.8 *************** *** 44,50 **** self.delegates.shift() self.clockModel.reset() ! self.clockTimer.Start(1000) else: ! self.clockTimer.Stop() self.update() --- 44,50 ---- self.delegates.shift() self.clockModel.reset() ! self.clockTimer.start(1000) else: ! self.clockTimer.stop() self.update() *************** *** 60,64 **** return self.delegates.enqueue(delegate) ! if not self.clockTimer.IsRunning(): self.shift() self.update() --- 60,64 ---- return self.delegates.enqueue(delegate) ! if not self.clockTimer.isRunning(): self.shift() self.update() |
From: Kevin A. <ka...@us...> - 2004-08-30 14:50:29
|
Update of /cvsroot/pythoncard/PythonCard/samples/jabberChat In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14090/samples/jabberChat Modified Files: jabberChat.py Log Message: converted wx.Timer references to timer.Timer and fixed case of methods Index: jabberChat.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/jabberChat/jabberChat.py,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** jabberChat.py 12 Aug 2004 19:18:53 -0000 1.32 --- jabberChat.py 30 Aug 2004 14:49:51 -0000 1.33 *************** *** 6,10 **** """ ! from PythonCard import configuration, model, sound import threading import Queue --- 6,10 ---- """ ! from PythonCard import configuration, model, sound, timer import threading import Queue *************** *** 41,46 **** self.thread.start() ! self.idleTimer = wx.Timer(self.components.listRoster, -1) ! self.idleTimer.Start(1000) # 1 second self.doResetIdle() --- 41,46 ---- self.thread.start() ! self.idleTimer = timer.Timer(self.components.listRoster, -1) ! self.idleTimer.start(1000) # 1 second self.doResetIdle() *************** *** 303,306 **** --- 303,307 ---- except: pass + self.idleTimer.stop() event.skip() |
From: Kevin A. <ka...@us...> - 2004-08-30 14:50:18
|
Update of /cvsroot/pythoncard/PythonCard/samples/webgrabber In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14090/samples/webgrabber Modified Files: webgrabber.py Log Message: converted wx.Timer references to timer.Timer and fixed case of methods Index: webgrabber.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/webgrabber/webgrabber.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** webgrabber.py 12 Aug 2004 19:19:05 -0000 1.12 --- webgrabber.py 30 Aug 2004 14:49:51 -0000 1.13 *************** *** 7,11 **** import wx ! from PythonCard import dialog, model import websucker import sys --- 7,11 ---- import wx ! from PythonCard import dialog, model, timer import websucker import sys *************** *** 96,105 **** self.sucker = None self.msgq = None ! self.clockTimer = wx.Timer(self.components.fldURL, -1) ! #self.clockTimer.Start(100) # 100 milliseconds def on_close(self, event): self.cancel() ! self.clockTimer.Stop() event.skip() --- 96,105 ---- self.sucker = None self.msgq = None ! self.clockTimer = timer.Timer(self.components.fldURL, -1) ! #self.clockTimer.start(100) # 100 milliseconds def on_close(self, event): self.cancel() ! self.clockTimer.stop() event.skip() *************** *** 147,151 **** self.message(msg) #self.top.after(100, self.check_msgq) ! self.clockTimer.Start(100, 1) # 100 milliseconds, one shot def go(self, event=None): --- 147,151 ---- self.message(msg) #self.top.after(100, self.check_msgq) ! self.clockTimer.start(100, 1) # 100 milliseconds, one shot def go(self, event=None): |