JScript: object doesn't support this property or method

Z

zdrakec

Hello all:

Consider the following class definition in JScript, using ASP.NET
AJAX:

Type.registerNamespace('Namespace.Subns.SubSubns.ClassName');
// class definition
Namespace.Subns.SubSubns.ClassName = function(property1, property2)
{
this._property1 = property1;
this._property2 = property2;
}

Namespace.Subns.SubSubns.ClassName.prototype =
{
get_property1: function() {return this._property1;},
get_property2: function() {return this._property2;}
}
Namespace.Subns.SubSubns.ClassName.registerClass('Namespace.Subns.SubSubns.ClassName');
//end class definition
//ClassName2 class definition, which extends ClassName
Namespace.Subns.SubSubns.ClassName2 = function(property1, property2,
property3)
{
Namespace.Subns.SubSubns.ClassName2.initializeBase(this, [property1,
property2]);
this._property3 = property3;
}
Namespace.Subns.SubSubns.ClassName2.prototype =
{
get_property3: function() {return this._property3;},
set_property3: function(property3) {this._property3 = property3;},
get_property1: function()
{
return "BASE CLASS PROPERTY: " +
Namespace.Subns.SubSubns.ClassName2.callBaseMethod(this,
"get_property1");
}
}
Namespace.Subns.SubSubns.ClassName2.registerClass('Namespace.Subns.SubSubns.ClassName2',
Namespace.Subns.SubSubns.ClassName);

This code works just fine EXCEPT when I include the "get_property1"
bit in the ClassName2 prototype definition. Specifically, I get the
"object doesn't support" etc. exception from Microsoft JScript when I
include the callBaseMethod call. If I remove that, it works just fine.
Similarly, if I attempt to use the isInstanceOfType method, or the
inheritsFrom method, I get the same error.
I downloaded and reinstalled the latest ASP.NET AJAX msi, and after a
good bit of digging I am at a loss.

Can someone point me in the right direction?

Best regards,
zdraked
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top