You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
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.
The text was updated successfully, but these errors were encountered: