Permalink
Browse files

I found a bug in DTGridView where changes to the underlying data

don't become visible when you pop back to a DTGridView from a
subsequent navigation controller view.

What actually happens is that the changes are noticed -
addCellWithInfo is called for each cell, but the previous views are
not removed. So if I pop back and forth (making changes to the
underlying data each time) I see the subviews count continually
increase. Since the view is underneath the other views it is not
visible.

Adding a call to removeCellWithInfo for each addCell didn't work
because it seems that some entries in gridCells have lightweight info
objects even if the cell is visible on screen.

The fix to addCellWithInfo feels a little hacky, but given the small number of subviews
onscreen at any one time it will at least be fast.
  • Loading branch information...
1 parent 5afda2b commit 0ccf34cfeeaddab69450da563fa9cc9a7294d9cd @aufflick aufflick committed Oct 21, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 DTGridView.xcodeproj/project.pbxproj
View
2 DTGridView.xcodeproj/project.pbxproj
@@ -319,7 +319,7 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
PREBINDING = NO;
- SDKROOT = iphoneos;
+ SDKROOT = iphoneos3.2;
};
name = Debug;
};

0 comments on commit 0ccf34c

Please sign in to comment.