Thanks for your suggestion Seth, even if it looks quite complicated i will try hehe
You said the "InterfaceComponent" is rather used for reading. How would it be if i would use the App-Option for the Controlling API ? Is there a specific function to save the opened model ? se...@tisue.net schrieb am Mittwoch, 23. September 2020 um 15:41:17 UTC+2: > `InterfaceComponent` was designed for read-only use. So what you want to > do isn't directly supported, and I suspect you'll have to assemble the > behavior you want out of pieces that are lying around: read the .nlogo file > from disk and break it into sections (ModelReader.parseModel), write out > other sections again as-is, but when you get to the widgets section, do > something special. InterfaceComponent extends AppletPanel which wraps an > InterfacePanel, which has an getWidgetsForSaving method which returns > a List<org.nlogo.window.Widget> which you can iterate over and call the > save method on each widget for writing to the .nlogo file, as in this code > from ModelSaver: > > // widgets > section { > for(w <- model.widgets) > buf ++= (w.save + "\n") > } > > That's a sketch of the most promising solution path I can think of. > Perhaps someone on the current development team will have a better idea, > not sure. > > Seth > -- You received this message because you are subscribed to the Google Groups "netlogo-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to netlogo-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/netlogo-devel/6c8fdb99-91e3-4574-b194-2b891f0fc2abn%40googlegroups.com.