Closing windows programmatically
Posted: Fri Oct 06, 2006 3:39 pm
How can I close a GUI window (as if I hit the "close" button) programmatically?
The NEURON Forum
https://www.neuron.yale.edu/phpBB/
Code: Select all
objref gr
gr // hoc will print NULLobject
gr = new Graph() // creates a new Graph object and maps it to the screen
gr // this will print the "real" name of the Graph
objref gr // gr no longer points to the Graph object, which is destroyed
gr // hoc prints NULLobject again
gr = new Graph() // another new Graph object
objref foo
foo = gr // now both gr and foo reference the same Graph
objref gr // the Graph persists because foo still points to it
ojbref foo // the Graph vanishes