Defect #551
plugins.WebClientUtils.generateCallbackScript(...) mixes up the method to call when generating callback scripts for 2 similar named methods in different toplevel scopes
0%
Description
if you define 2 methods named "callback" in 2 different scopes (scopes.x and scopes.y) and generate the callbackScripts for them, one of the two always methods always gets called, regardless of the callbackscript used.
I think this is due to the checks made in addCallback in BehaviorProvider: it tries to reuse callbackscripts if you try generating callbackScripts for the same method multiple times, but the checks only take into account formName and methodsName, not scopeName. since the formName doesn't exists (it's a toplevel scope method) and the names of the methods are equal, the code reuses the first callbackscript that was generated.
Files
History
Updated by Patrick Talbot over 12 years ago
- File web_client_utils.jar web_client_utils.jar added
I've set the key to the callbacks Map to be the Function hashCode instead of the functionDefinition and test on that key, it should better assess the identity of the initial Function than the FunctionDefinition's hash and content.
Could you try the attached patched plugin and tell me if this solves the issue?
Thanks!