I am trying to use the $addHandler function to add a handler to a text box’s click event
var o=$get('myTextBox'); var f = Type.parse('funcWithArgs'); $addHandler(o, 'click', f);
However I need to pass parameters to the called function. How do you do that?
TIA
Wrap your function with an anonymous function (aka lambda):
Alternative solution:
If you had a function that created partials, you could do that as well – I use a toolkit that provides for that, and this is how it would be done:
I don’t know (and actually doubt) that Microsoft’s framework provides for that, but you could look into writing your own
partialfunction.