![]() Once those lines have been run and the browser doesn't have anything else to do, then it will import the file. Instead, they are always read asynchronously, with line 10 of the aforementioned, hypothetical 20-line procedure now telling the browser that it should import the file whenever the browser is ready, followed by the browser immediately running lines 11-20 before actually importing that file. In browser-based applications, though, files cannot be read synchronously. ![]() In desktop NetLogo, importing a file happens "synchronously", which is to say that, if your model says to run import-world on line 10 of a 20-line procedure, NetLogo will not run lines 11-20 until after import-world has completed. Secondly, these primitives behave differently in a way that, under particular circumstances, can be surprising. Instead, NetLogo Web will open up a file dialog and ask you to manually select the to-be-imported file from your file system, regardless of the value of the string argument. For one, when importing a file in NetLogo Web, the string argument to the import-* primitive is accepted (out of a need for compatibility with desktop NetLogo) but ignored (due to the fact that browser-based applications cannot automatically read files directly from your computer). Here in NetLogo Web, import-* primitives work a bit differently from how they work in desktop NetLogo.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |