This repository has been archived by the owner. It is now read-only.

Refactor project and screen pages to use Backbone.js. #84

merged 3 commits into from Sep 6, 2012


None yet
2 participants

karthikv commented Sep 5, 2012

I'm running into one main issue: with enough element moving/creation, I can sometimes get an element linked list to become circular. Note that each component has one of these linked lists that determine how the elements are placed within it. I'm still unsure what's wrong with my logic that is causing this problem, especially because it only happens sporadically. If you can find a way to reproduce it, let me know. Otherwise, I think I'll need to just stare at my code until something hits me.

You'll know when you've reproduced it when you suddenly see about 100 duplicate elements on the page that you did not add. I've added a check in my loop that prevents it running from over 100 iterations; it'll instead stop and print something along the lines of 'probably an infinite loop' in the console.

@ghost ghost assigned karthikv Sep 5, 2012

ednapiranha pushed a commit that referenced this pull request Sep 6, 2012

Merge pull request #84 from karthikv/backbone
Refactor project and screen pages to use Backbone.js.

@ednapiranha ednapiranha merged commit 515c3b6 into mozilla:master Sep 6, 2012

Hmm I tested it locally and wasn't able to get this bug to happen (added about 15 links to a component and even did a console.log on the index to see if it would jump to 99+ but it never did)


karthikv replied Sep 6, 2012

Did you try moving elements around within their component? It generally happens after you do a lot of element sorting. I actually haven't been able to reproduce the bug myself now after that last linked list reorganization commit. I'll keep an eye out for it, but perhaps it has been fixed.

yep i did that a few times.. couldn't replicate the issue. also was testing on Nightly - does it happen in all browsers for you?


karthikv replied Sep 6, 2012

I was on Chrome, but if it's really a logic error, I doubt it should matter which browser you're using. I can't find out for sure, either, because I am no longer able to reproduce the issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.