- 
                Notifications
    You must be signed in to change notification settings 
- Fork 2.2k
Regression on delegates calls #724
Conversation
| @RuiAAPeres Does this resolve the issue without breaking the nil-delegate use case that prompted the original change? Bug also reported here: #721 | 
| It does. The cell sizes are respected. | 
| Interesting...the intermittent test failures may actually be related to this area! Application Specific Information: | 
| @appleguy I was thinking about if instead of reseting these to  Maybe to:  | 
| @RuiAAPeres could you give it a try and see if that allows the tests to pass? I think they are crashing every time with this diff, as I did re-run them. | 
| @appleguy tried multiple combinations with that code, but the tests always fail. A quick search for  | 
| @appleguy apparently my last commit did it! ✨ | 
| @RuiAAPeres so I also reverted my original change, and that may have had an impact because I think your new submitted diff will rebase onto master. Can you pull in the other elements of my original change into this diff, that would enable the nil delegate to work? Namely the -init changes. | 
Call UIViewController's designated initializer in ASViewController
…cTests Add snapshot tests for ASStaticLayoutSpec
| @appleguy, @RuiAAPeres any word on the status of this fix? Ran into some issues in my app internally that would benefit from having nil delegate supported. | 
| @levi from my tests, it works when you got an initial delegate nilled and then you set a new one. What I saw was when you do something: nil, delegate, nil. Things weren't working. | 
| @levi just confirming, do those issues still exist in latest master? File a task with details if you get a chance. | 
| I'm seeing some strange nil delegate crashes in my production app, but I'm too far removed right now to be able to draw a relationship to this ticket. I just want to clarify, the support for nil delegates was merged and then rolled back, and now we're pending a fix to merge it back in? 
 | 
| @levi I'm nearly positive it was merged in again after changes. @RuiAAPeres am I right? Do you remember for sure? | 
| @levi as such, posting full data about the crashes would probably be useful when you come across them again. | 
| I'll collect what we've gathered with ASDK master in our production app and send you some logs this week. Still assessing the source in regards to ASDK, but there's enough of them that I'm confident we'll be able to fix a bug or two in ASCollectionView and ASTableView. | 
| @appleguy from what I remember it was reverted. So I was using my fork. | 
| @RuiAAPeres I will figure out what happened exactly, but I'm nearly certain I intended to merge this PR and then close it — but somehow just closed it. ha. | 
| OK, I don't understand WTF is going on with this PR. In the files changed, it is just @nguyenhuy's awesome test additions for static layout spec. And it shows that the PR can be merged, even though this has already been landed. @RuiAAPeres would you be able to re-submit your fixed version of the nil delegate handling patch? Naturally the discussion was about a mysterious part of the change that no one could explain the necessity of, but I'm willing to land that change and later investigate the details, as clearly it will improve the behavior for a few apps. | 
| Ok, let me close this, and re-submit. | 
It seems #706 broke the way the delegate calls were being made (
table:didSelectRowAtIndexPath:is not being called anymore). I am not sure why, but the previous one should work as well, since thetargetis just being replaced. I will test with the DataSource methods later, as it is probably happening the same there.I also had a look at the selectors that were hitting
ASTableProxy'srespondsToSelectorandtable:didSelectRowAtIndexPath:wasn't. I tested withASTableView, but I am guessing theASCollectionViewwill have the same behaviour.