Binding.removeHandlerAsync doesn't work as documented RRS feed

  • General discussion

  • Hi,

    I am working on an excel addin. In this addin, I add and remove data change event handlers on a binding. As per the documentation of Binding.removeHandlerAsync, I see that:


    If the optional handler parameter is omitted when calling the removeHandlerAsync method, all event handlers for the specified eventType will be removed.


    But in reality, I get an exception saying that the parameters to the removeHandlerAsync method are invalid. tried the following:"bindings#MyBinding").removeHandlerAsync(Office.EventType.BindingDataChanged, {}, callback);
"bindings#MyBinding").removeHandlerAsync(Office.EventType.BindingDataChanged, callback);

    But both the approaches failed. I was able to proceed only when I explicitly passed in the handler information like this:"bindings#MyBinding").removeHandlerAsync(Office.EventType.BindingDataChanged, {handler:onDataChange}, callback);

    Is my usage of the API correct? 



    Tuesday, October 13, 2015 6:57 PM