Update of /cvsroot/pythoncard/PythonCard/samples/iacGrid
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30246
Modified Files:
iacGrid.py
Log Message:
comments about selections, removed crashing lines
Index: iacGrid.py
===================================================================
RCS file: /cvsroot/pythoncard/PythonCard/samples/iacGrid/iacGrid.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** iacGrid.py 28 Jul 2006 15:37:29 -0000 1.3
--- iacGrid.py 28 Jul 2006 16:22:30 -0000 1.4
***************
*** 29,32 ****
--- 29,38 ----
self.mygrid = mygrid = self.components.mygrid
+ # KEA 2006-07-28
+ # until we figure out dynamic resizing of the grid
+ # we could set the initial grid to a reasonably large
+ # value for in memory tests
+ # to support very large arbitrary size data sets will
+ # require the use of a wx.GridTableBase
mygrid.CreateGrid(30, 6)
***************
*** 46,50 ****
# is first created in wxWidgets on the Mac which requires that this call
# be done late rather than immediately after the grid creation
! mygrid.EnableEditing(False)
--- 52,58 ----
# is first created in wxWidgets on the Mac which requires that this call
# be done late rather than immediately after the grid creation
! # on Windows, even this caused a crash, so commenting it out until
! # I can figure out the problem
! ## mygrid.EnableEditing(False)
***************
*** 54,57 ****
--- 62,69 ----
for row, line in enumerate(open(filename)):
fields = line.rstrip().split()
+ # KEA 2006-07-28
+ # in order to dynamically size the grid
+ # according to the docs it looks like we would use AppendRows
+ # and AppendCols but this also appears to cause a crash
## if row >= mygrid.GetNumberRows():
## print "adding row"
***************
*** 65,72 ****
--- 77,95 ----
+ """
+ KEA 2006-07-28
+ in order to support discontinuous selections it appears
+ we need to check the grid for which cells are actually
+ selected on selectCell and rangeSelect and/or keep
+ an updated dictionary of cells after each selection is
+ made. GetSelectedCells() appears to only return an empty
+ list, which is probably another bug
+ """
+
def on_mygrid_rangeSelect(self, event):
if event.Selecting():
self.log.write("rangeSelect: top-left %s, bottom-right %s\n" %
(event.GetTopLeftCoords(), event.GetBottomRightCoords()))
+
tl = r1, c1 = event.GetTopLeftCoords()
br = r2, c2 = event.GetBottomRightCoords()
|