Setting handlers after creation


Basically when you create an enyo Control you specify handlers this way:

name: "MyKind",
components: [
{name: "myControl", content: "my content", ontap: "myHandler"}

myHandler: function(inSender, inEvent) {
alert("myControl tapped!");
But is it possible to affect handler after the control has been created, like this:
    this.$.myControl.ontap = enyo.bind(this, this.myHandler)
Of course this doesn't work, but is there any similar way to do this using enyo?


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!