This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
after declaring function using one of depicted below approach, the function is not available in cc. add = new Function("a", "b", "return a+b;"); add = function(a, b) { return a+b; }
We cannot support dynamicaly created methods in cc since it is not posible to determine in which scope such a method is visible. We know scope of variable 'add' and thus it can be offered by cc as a varible, but it is not possible to track values assigned into it. The only use case that should be fixed is declaration of object's function like: Number.add = new Function("a", "b", "return a+b;")
>feature
In the js editor in NB 7.3, the cc offers both cases. Only at the first case, it offers add as variable, not a function.