Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reload data does not update cells #7

Closed
bhatti opened this issue Jul 16, 2010 · 6 comments
Closed

reload data does not update cells #7

bhatti opened this issue Jul 16, 2010 · 6 comments

Comments

@bhatti
Copy link

bhatti commented Jul 16, 2010

I am testing AQGridView, where I load different data based on the filter defined and it's not updating cells when I call reloadData and still displays same cells. Just looking at the code, there seems to be a problem with animation as updateVisibleGridCellsNow method finds _animationCount > 0 and returns without updating the view. Please help.

@AlanQuatermain
Copy link
Owner

I'll have to take a look at this, but there have been some fiddly changes made to AQGridView here over the last week, and it may be fixed by that. I'll post more when I find out what's happening.

@AlanQuatermain
Copy link
Owner

This should be fixed after last week's code dump from Kobo. Let me know if it's still happening, otherwise I'll close this bug soon.

@woutergoossens
Copy link

I also have this problem when I want to update the gridview with reloaddata

Warning: tried to add duplicate gridview cell

Do you have any solution yet?

@shizam
Copy link

shizam commented Oct 2, 2010

Also have a similar issue re: 'Warning: tried to add duplicate gridview cell' which seems to stem from this problem:

AQGridView:reloadData
[_visibleCells makeObjectsPerformSelector:@selector(removeFromSuperview)];
[self enqueueReusableCells: _visibleCells];
[_visibleCells removeAllObjects];

AQGridView:enqueueReusableCells
if ( [_visibleCells containsObject: cell] ) {
NSLog( @"Warning: tried to add duplicate gridview cell" );
continue;
}

Notice that reloadData calls 'enqueueReusableCells' before asking visibleCells to removeAllObjects but w/in 'enqueueReusableCells' it checks if visibleCells contains the cells (which it still does at this point) and throws the warning.

So it never actually enqueues the cell for reuse and it gets released, it looks like every time you reloadData it has to recreate cells...

@AlanQuatermain
Copy link
Owner

The issue with the warning you mention has been fixed in the latest commit, so you shouldn't see this issue any more.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants
@AlanQuatermain @bhatti @woutergoossens @shizam and others