safewolf
3 Jan 2011, 7:11 PM
hi, everyone
i have read some codes about the extjs
but something confused me.
when i create my own class, which is extend from some existing class
i can add my own functions like this:
MyClass = function(){
//private
myPrivate1 = function()
{
}
//public
myPublic1 = function()
{
}
this.myFunction = function()
{
}
MyClass.superClass.constructor.call(this,{});
}
Ext.extend(MyClass,SomeExstingClass,{
myFunction : function()
{
}
})
so, the questions is that
is there any differences between the 4 functions?
i have read some codes about the extjs
but something confused me.
when i create my own class, which is extend from some existing class
i can add my own functions like this:
MyClass = function(){
//private
myPrivate1 = function()
{
}
//public
myPublic1 = function()
{
}
this.myFunction = function()
{
}
MyClass.superClass.constructor.call(this,{});
}
Ext.extend(MyClass,SomeExstingClass,{
myFunction : function()
{
}
})
so, the questions is that
is there any differences between the 4 functions?