-
Notifications
You must be signed in to change notification settings - Fork 48
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
manager.whenSelected not work #34
Comments
Do you call registerCellClass method for LabelCell? You have two different types of cells, |
Sorry I copied method from another controller
LabelCell registered with manager |
What version of DTTableViewManager are you using? In my projects and unit tests whenSelected seems to work fine. |
This records form Podfile.lock
|
Hmm, interesting. Do you have only one cell, or maybe you have some subclasses also registered? It would be great if you printed those
What are values for these variables? |
output: |
I add to return value
reaction.reactionType=CellSelection |
Wow. So, reaction.viewClass == unwrappedView.dynamicType is failing? That's super weird. The only crazy idea i have right now is maybe you have overloaded comparisons between types? |
Or I have 2 LabelCell classes in project ( and they mixed in runtime |
I can not understand this problem but maybe it a source of other issues |
I think I agree to compare String representations of those variables, however this case needs to be reproduced in our test suite, so we had protection against other issues in the future. Can i ask you to reproduce this behaviour in unit tests in DTModelStorage? |
Closing due to inactivity, please feel free to reopen if you have any additional information. |
Hit the same issue. How to reproduce this? |
I have no idea, never managed to reproduce this behavior. Were you able to reproduce while debugging in Xcode? If yes, what versions of Xcode, Swift, and DTTableViewManager are you using? |
Just to add some more weirdness. It works under one target, and does not under another. Console output:
|
Swift is insane nowadays))) Maybe connected to Debug/Release configurations. Can you try using previous solution found in this thread? return reaction.reactionType == type && String(reaction.viewClass) == String(unwrappedView.dynamicType) |
Yes, this helps. |
use Realm in memory to make Realm fine grained notifications tests run correctly
Looks like you've added a commit with this fix. Cool! |
I'm actually making release right now =) I'll update this issue when it will be ready. |
Cool! Thanks for SWIFT support. |
Aaand finally all releases are live 🍻
|
Great! And it works. |
I use my custom cell class LabelCell in storyboard
This is setup method
I fill cells and they appear in table
but "manager.whenSelected" not work and
print("Selected \(post) in \(postCell) at \(indexPath)")
- never calledIn debug seems that fail in next place
The text was updated successfully, but these errors were encountered: