NetLogo / NetLogo-Web-Client

A NetLogo web client that uses node.js to talk to a remote NetLogo instance. Obsoleted by:
https://github.com/NetLogo/Teletortoise
3 stars 2 forks source link

Sending consecutive create messages fails sometimes #18

Open philipwoods opened 12 years ago

philipwoods commented 12 years ago

This is surprisingly predictable. The 'ct' and 'ct2' messages will fail to display turtle 0 on the second send, turtle 1 on the third send, and after that everything is fine. They act the same way if alternated. 'cl' appears to work, but 'cp' fails to display patch 0 on the second send and then works fine.

TheBizzle commented 12 years ago

After a lot of investigation, this looks to be the result of some funky bug(s) in paper.js. Namely, Item.setName messes up how it tracks the parent Item's children. The case where adding the same turtle/patch twice is even a conceivable course of action (which, to me, seems to only be with models runs-like stuff) is uncommon, and this doesn't need to be used for a while yet, so I don't feel too bad about punting on this issue for now.