Set any control AllowListeners property to true
or use SetListenable() method
to allow its events listening.
Examples
var appForm;
function ngMain(){
appForm = new ngControls({
Invoker: {
Type: 'bbbfly.Panel',
Data: {
AllowListeners: true
}
}
});
var Listener = {
OnUpdate: function(){return true;}
OnUpdated: function(){}
};
appForm.Invoker.AddListener(['OnUpdate','OnUpdated'],Listener);
appForm.Update();
}
var appForm;
function ngMain(){
appForm = new ngControls({
Invoker: {
Type: 'bbbfly.Panel'
}
});
var Listener = {
OnUpdate: function(){return true;}
OnUpdated: function(){}
};
bbbfly.listener.SetListenable(appForm.Invoker,true);
appForm.Invoker.AddListener(['OnUpdate','OnUpdated'],Listener);
}
In Packages
Interfaces
Methods
-
static bbbfly.listener.Initialize ()
-
Initialize listener to add interface methods automatically
-
static bbbfly.listener.SetListenable (obj, force){boolean}
-
Sets Listenable interface methods to passed object if its AllowListeners property is set to true.
Parameters:
Name Type Description obj object Object whose events should be listenable force boolean Set object listenable even if its AllowListeners property is set to false Returns:
Type Description boolean If was set