`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/b32594a5-b101-4b5d-a8ac-e705b614ba32n%40googlegroups.com.

Reply via email to