module Ext_util_Observable:Base class that provides a common interface for pu ...sig..end
Base class that provides a common interface for publishing events. Subclasses are expected to to have a property "events" with all the events defined, and, optionally, a property "listeners" with configured listeners defined.
For example:
Ext.define('Employee', {
mixins: {
observable: 'Ext.util.Observable'
},
constructor: function (config) {
// The Observable constructor copies all of the properties of `config` on
// to `this` using Ext.apply. Further, the `listeners` property is
// processed to add listeners.
//
this.mixins.observable.constructor.call(this, config);
this.addEvents(
'fired',
'quit'
);
}
});
This could then be used like this:
var newEmployee = new Employee({
name: employeeName,
listeners: {
quit: function() {
// By default, "this" will be the object that fired the event.
alert(this.name + " has quit!");
}
}
});
class type t =object..end
class type configs =object..end
class type events =object..end
class type statics =object..end
val get_static : unit -> statics Js.tval static : statics Js.tval capture : 'a Js.t -> 'b Js.callback -> 'c Js.t Js.optdef -> unitstatics.captureval observe : 'a Js.callback -> 'b Js.t -> unitstatics.observeval releaseCapture : 'a Js.t -> unitstatics.releaseCaptureval of_configs : configs Js.t -> t Js.tof_configs c casts a config object c to an instance of class tval to_configs : t Js.t -> configs Js.tto_configs o casts instance o of class t to a config object