Skip to Content
0
Oct 26, 2015 at 03:21 PM

How to register function for an event control?

36 Views

Hey there,

I'm looking for a way to subscribe a function for a specific events of a control.

In my scenario there is provided the method attachSearch() for the control FilterBar that attaches event handler fnFunction to the 'search' event. But strangely enough while I'm calling this method by following line just calls my onMyMethod directly.

this._oSmartFilter.attachSearch(this.onMyMethod(oEvent));

After raising the event "search" the following error is returned:

Uncaught TypeError: Cannot read property 'call' of undefined

Any ideas?

Thanks for your help in advance.

Robert