Hi everyone ?,
I am developing an application used for some registration of data at my workplace, and landed on an AJAX architecture using a series of C# developed services and a “client application” in javascript for user interaction.
I like to work in an object oriented fashion, and have previously defined objects as such:
[CODE]function MyObject()
{
this.myMethod = myMethod;
function myMethod()
{ /* code */ }
}
var obj = new MyObject()
However, this time I tried to simplify my code by doing:
[CODE]function MyObject()
{
this.myMethod = function myMethod()
{ /* code */}
}
var obj = new MyObject()
This works well, and browsers have no problems with this. However, Netbeans does not manage to derive code completion suggestions from this code. It simply does not recognize [I]myMethod[I]MyObject
Is this indicative that it is not correct somehow to assign function pointers the way I do?
It is not major issue, but it does make my code clean, IMHO.
Best, Knut