-
Notifications
You must be signed in to change notification settings - Fork 57
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
NSManagedObject changes not detected by TLIndexPathController #68
Comments
Hm, OK. :) Digging further into your code, I guess what I was missing here was the So, I guess this raises two questions. 1) Is my diagnosis correct, and do you think that's the best way to address the issue?, and 2) If isEqual doesn't detect basic property changes, what does it detect, and what should it detect? Thanks for any ideas you may have on this. I certainly learned something today. |
Detecting modifications is kind of a weak point of the framework :) As you can guess, I could probably spot the problem right away if I had a working project for your test case. I'd suggest adding some breakpoints in |
Thanks for the input. The best guess I have right now is that I need to dig into this a bit deeper and see how it can be addressed most simply. Tomorrow. :) |
There should only ever be one instance of any given Core Data object in a context. So,
|
Hm, yeah. That's sort of what I figured initially. If that's the case, I can only guess there is something wrong with the plumbing in how |
I just did a quick look to see if |
OK, attached is a sample project that exactly illustrates the issue I am having. I've included tests against Update: weirdly, the main issue seems to be that Another update: I think I found the bug. In addition to tracking
Let me know what you think! |
The main issue with the text is that You'll also want to use permanent object IDs so that TLIPS can keep track newly created objects saves. To do this in your test, for example, add the following following line after creating the address:
Alternatively, if your model object has an ID field of its own, you can pass that as the Does that help? |
Ah, ok, thanks. I will look into this. Yeah, I do need to sort on I will look at the |
TLIPS seems to be consistent with |
Yeah. I think that would be necessary for anyone wanting to use TLIPT with a sort order specified, and properly report such zero-distance moves. There doesn't seem to be any other way to catch it and I absolutely need that for my app. |
Got this on my todo list. |
Thanks. I am using my hack in the meantime and it seems to be pretty solid. |
One other note, in case it is relevant. I am seeing issues where when a predicate is set on the To illustrate, if
Thanks! |
Can you check if |
Actually, scratch that last issue. I am pretty sure I figured out what was causing it, and I think it's something I did. Original issue still stands. Thanks so much! |
Any update on this? One thing I am still seeing, even with my 'fix' in place —
Therefore, an indicator displaying |
It isn't a TLIPT issue. Table view's don't call |
Ah, thanks. This is on a UICollectionView but I imagine the logic is basically the same. I will check that out! |
Hi there. I am using the latest TLIndexPathTools (0.4.3) with Core Data and came across a bug that seems to be related to TLIndexPathController (or my understanding of it.)
In short, TLIndexPathController is not populating
modifiedItems
when it should be. It does callcontroller: didUpdateDataModel
butupdates
has an emptymodifiedItems
array.Not being sure where the issue was, I wrote two tests, one against
NSFetchedResultsController
and another againstTLIndexPathController
to detect the same exact changes. TheNSFetchedResultsController
tests work as expected, while theTLIndexPathController
tests fail to detect intermediate changes. I would like to have theNSFetchedResultsController
behavior.I think this is either a serious issue, or a wild misunderstanding on my part. Either way I'd appreciate your guidance, and if it is an issue, I'd love to try to help resolve it. This library is a godsend and besides for this issue has been 100% solid for me. Thanks.
My tests:
The text was updated successfully, but these errors were encountered: