1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    69
    Vote Rating
    2
    deshartman is on a distinguished road

      0  

    Default fireEvent with parameters

    fireEvent with parameters


    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

  2. #2
    Sencha User
    Join Date
    Feb 2012
    Posts
    69
    Vote Rating
    2
    deshartman is on a distinguished road

      0  

    Default


    Never mind. I figured it out. The type of event needed a reference to the component.

    Des