Could someone explain why fireEvent needs to have "this" passed as one of the parameters to make the rest of the parameters work?
E.g
Code:
this.fireEvent("SomeCustomEvent", myRecord); ---> record is a prototype value
versus
Code:
this.fireEvent("SomeCustomEvent", this, myRecord); ----> myRecord is the desired value picked up
The documentation does not mention anything about it? Should it be updated?
"fireEvent( String eventName, Object... args ) : BooleanFires the specified event with the passed parameters (minus the event name, plus the options object passed to addListener).
An event may be set to bubble up an Observable parent hierarchy by calling enableBubble.
Parameters- eventName : StringThe name of the event to fire.
- args : Object...Variable number of parameters are passed to handlers.
Returns- Boolean returns false if any of the handlers return false otherwise it returns true."
Thanks
Des