Closed Malabarba closed 9 years ago
I was going to implement this and make a PR, but I see now it's already implemented in traits.clj
. But there's on caveat, its arglis has 2 arguments, whereas the arglist of other :on-X
traits take 3 arguments. Could that be the cause of thebug?
The number of arguments to the function is equal to the number of arguments the Listener object takes. The fact that other :on-x
traits take other number of arguments is incidental, there is no rule there, every handler is unique.
Yeah, I also found the previous issue: #26.
The number of arguments to the function is equal to the number of arguments the Listener object takes.
Really? I'm not refering to the arglist of the callback function, but the following argvector [^TextView wdg, {:keys [on-editor-action]}]
. If this has to be equal to the number of arguments of the listener object, shouldn't that be 3 then?
You are right, that is a bug. I will fix it in the nearest version.
So this was already fixed in 722b4b010261818fb7fe0ec83e7016dd74e1cd07 :balloon:
If I specify a
:on-editor-action
in a text-view's map like the following, I get an exception saying there's no such method.setOnEditorAction
.I tried
:on-editor-action-listener
, but I get the same problem.