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

Problem with LS models being edited in tabs while also edited in real NetLogo instance #134

Open
arthurhjorth opened this issue Mar 7, 2019 · 2 comments

Comments

@arthurhjorth
Copy link
Member

This is borderline user-issue, and not really a code issue. But given that we want the IDE-part of LS to be good, I still think this is something we should consider:

I was working on a model this morning and had to create a LS child model. I realized pretty quickly that I had to edit the interface of the child model, and I therefore had to open it in a full-fledged NetLogo instance, so that's what I did.

I worked on the child model for a while in a separate instance, closed it down, and then shut down the NetLogo instance with the main model in it, which ALSO contained the child model in a separate tab.

I didn't think too much about it when NetLogo asked me if I wanted to save changes to the model, because I thought it was asking me about the main model. Unfortunately it meant the child model, and all the work I had done on it in the other instance was overwritten.

I am not totally sure how we should handle this, but the easiest way is to make very clear that saving a model will also save the child model, or to pop up a special "HEY USER, PAY ATTENTION!!!!" message when it tries to save a LevelSpace model.

Alternatively we could check if there is a .tmp file that has been saved more recently than the one that LevelSpace child-tab. I can see all kinds of horrible issues with this solution, but I also like it.

@LaCuneta
Copy link
Contributor

LaCuneta commented Mar 7, 2019

Alternatively we could check if there is a .tmp file that has been saved more recently than the one that LevelSpace child-tab. I can see all kinds of horrible issues with this solution, but I also like it.

Yeah, most good source code editors will monitor open files for changes and automatically refresh them. I think that would make the most intuitive sense, but you do have to deal with conflicts (unsaved edits in NetLogo and a change on the file system) so that might not have helped much in your case. At least then NetLogo could be smart enough to give a good message about the conflict.

@arthurhjorth
Copy link
Member Author

At least then NetLogo could be smart enough to give a good message about the conflict.

Exactly - I don't necessarily need version control built into LS, but it would be nice to just get a CLEAR warning that I'm about to do something that I might regret later. This would be nice feature for IRL too, btw.

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

No branches or pull requests

2 participants