My code is something like this:
Code: Select all
begintemplate myGUI
objref myObject
proc init{
myObject =$o1
}
// More code among them the creation of a VBox or HBox called box
proc save(){
box.save("load_file(\"myGUI.hoc\")\n}")
// This is the kind of thing I would like to do (ocbox_ is an object created by the save (session) mechanism of the VBox or HBox )
sprint(tstr, "{%s = new myGUI(%s)}", "ocbox_",name(myObject))
box.save(tstr)
}
endtemplate myGUI
I had a look at the StringFunctions class. Which prints the desired information to screen with the references method, but gives no further access to them. There are some obvious workarounds, like passing both the objref and its name during creation, but that puts on us the burden of either deciding up front we are going to save the window or always specifying a string we might not use.
Does anybody have some ideas as to how to get to this information?