Scope.setListener
Description
This method can be used to listen to changes to a Scope variable.
//hide the property panel when it is opened.
Editor.getScope().setListener("showProperties", hidePanels);
function hidePanels()
{
var s = Editor.getScope();
if(s.get("showProperties") == true)
s.set("showProperties", false);
}
Syntax
Scope.setListener (name : String, handler : Function reference)
Arguments
- name
String. The name of the scope variable.- handler
Function reference. The function to be called when changes occur to the scope variable.