vellerefond / project-ring

Project management for the Atom editor.
GNU General Public License v2.0
15 stars 8 forks source link

Cannot set property 'treeViewState' of undefined #5

Closed petey closed 9 years ago

petey commented 9 years ago

I get these errors occasionally when opening a new folder, without interacting with ring directly.

Uncaught TypeError: Cannot set property 'treeViewState' of undefined project-ring.coffee:472 module.exports.add project-ring.coffee:472 (anonymous function) project-ring.coffee:68

(This one doesn't make sense to me as there's no mention of 'treeViewState' anywhere around this code.) Uncaught TypeError: Cannot set property 'treeViewState' of undefined /Users/petey/.atom/packages/project-ring/lib/project-ring.coffee:725

vellerefond commented 9 years ago

Please, report if this still occurs after updating to v0.17.0. An API change in Atom was causing problems with the package's logic so this could be a side effect (I have not been able to reproduce this).

petey commented 9 years ago

I still see this error.

I can reproduce this by switching project paths (not using project-ring) and opening a file in the new project.

vellerefond commented 9 years ago

@petey thanks for the input. Please, update to v0.18.0 (8b0ee0ce8df6ddf28abdd4daa0738a7160e53a31). This fixed it for me. If not yet fixed for you then something else is happening as well (i.e., something I did not come across during my tests) so please reopen this issue.

petey commented 9 years ago

I'm still seeing this issue after update to 0.18.0. I think this is largely due to switching projects using https://github.com/guileen/project-switcher instead of the project-ring switcher.

project-switcher is nice as it picks up all the "projects" I have in sibling directories as opposed to only those I have specifically configured, e.g. those added to the ring. I don't have any problem with adding these to the ring as I use them, but when I switch to these I get the "treeViewState" error (amongst others).

vellerefond commented 9 years ago

OK, now I am curious :-). I will try using project-switcher as soon as I find the time. I believe this is a case of a plugin messing with another, perhaps due to the live tree-view and file monitoring of project-ring.

vellerefond commented 9 years ago

@petey I tried to reproduce this but I couldn't, even having installed project-switcher. If it is possible, could you please provide detailed steps (with a clean project-ring state: e.g., open Atom, go to folder, add to project-ring, switch to other folder with project-switcher (the other folder is in project-ring as well or completely unrelated?)) as to how to reproduce this? Plus, a mini description of the folder structure would be of great help in understanding the state changes from step to step. This would help me a great deal to fix it. Thank you in advance.

vellerefond commented 9 years ago

Since it has a long time without an update and it hasn't been reported by others, as well, I am closing this until it happens again.