Skip to content
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

Unable to open project with nested trees #5

Open
closeratio opened this issue Sep 11, 2015 · 1 comment
Open

Unable to open project with nested trees #5

closeratio opened this issue Sep 11, 2015 · 1 comment

Comments

@closeratio
Copy link

closeratio commented Sep 11, 2015

If I have a project where a tree references another tree that is below it in the list on the left of the editor, I save the project, and then attempt to reopen it, the editor fails with an error message.

After taking a bit of a look at the source, this appears to be because the trees in the serialised JSON are stored in an array, and if a tree refers to a nested tree which exists after it in said array, it won't have added it within the NodeManager, and hence will fail.

I would either suggest changing the JSON format so that the trees are stored as key-value pairs (much like the nodes), or having an additional processing phase before attempting to load the tree, so that the node manager is aware of all the nodes that exist within the project file. The latter approach wouldn't invalidate existing projects files, and is probably the preferred one from my point of view.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@renatopp
Copy link
Member

renatopp commented Oct 2, 2015

Thanks for reporting this. The multiple trees feature is turning out to be a real pain to implement, not just in the editor but also in the client libraries.

In order to have a more descriptive issue, I'm going to create another thread about how to handle multiple trees (see #8) and keep this one open as a current bug. I would like to fix this bug together with the changes on the multiple trees feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants