Announcement

Collapse
No announcement yet.

I added a button to a view and subscribed but its handler is never invoked?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • I added a button to a view and subscribed but its handler is never invoked?


    in the setup function of a view I added a button with this event handler:
    Code:
    onClick: function (dialog) {
        this.trigger('myCustomEvent');    
        dialog.close();
    }.bind(this);
    When I instantiate the view I do this in the 'callback' parameter of createView:
    Code:
    [FONT=courier new]this.listenToOnce(view, 'myCustomEvent', function () {
      alert("event activated!");
      // execute additional code...
      view.close();
    }.bind(this));[/FONT]
    But the alert is never executed. Do I need to define the string I use in this.trigger somewhere ?
    Last edited by tothewine; 12-26-2018, 12:12 AM.
Working...
X