Hacker News new | past | comments | ask | show | jobs | submit login

'Collections should keep track of their views' seems badly explained. You're not keeping references to views on a collection, you're keeping a reference to subviews inside a view that uses a collection. The code is correct, and agnostic to whether the collection is local to the view, or a shared collection.



Thanks for the feedback. I will update the post.

Yes, collection should keep track of the subviews. Not the view that initializes the collection


Actually I goofed up while typing out the post a bit. Views that contain subviews should keep a track of the sub-views. Not collections. I have updated the post. Sorry for the confusion


indexOfTicket and prevTicket are unused in your collection's addOne() function.

</nitpick>


Sorry about that. Actually they are used in the real code but I removed a lot of other stuff when I copied over. I should have deleted more carefully




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: