Close dockable panel programmatically?
Hi There,
Is it possible to simply close a dockable panel that my script creates with a line of code? I thought I might be able to use the Window.find() method, but that doesn't seem to work. Here is how I am instantiating the dockable panel (of course this assumes the user launches the script from the "Window" menu):
var win = (this.context instanceof Panel) ? this.context : new Window('palette', enums.panel_title, undefined, {resizeable : true});
So this creates the dock just fine, and gives it the title from the string found in `enums.panel_title`. In a function of seperate and different another script, I would like to close that panel programmatically, so I tried this:
var existing_gui = Window.find('palette', enums.panel_title);
if (existing_gui)
existing_gui.close();
And yet, `existing_gui` remains null even after the Window.find() call.
Thanks for your time and help!
--Arie
