SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 87 | Next

Robin Pars, Laurence Moroney, and John Grieb

"Foundations of ASP.NET AJAX"

IStickShift = function()
{
this.get_GearCount = Function.abstractMethod;
this.set_GearCount = Function.abstractMethod;
this.get_CurrentGear = Function.abstractMethod;
this.set_CurrentGear = Function.abstractMethod;
}
AJAXBook.IStickShift.registerInterface('AJAXBook.IStickShift');
It defines four abstract methods that any class using this interface must support. The
abstractMethod property defines the method names and parameters but gives no method
implementation. They are ???Set the current gear,??? ???Get the current gear,??? ???Set the number
of gears the transmission has,??? and ???Get the number of gears the transmission has.??? A real
sports car is one that implements this interface and, by definition, these methods:
AJAXBook.SportsCar = function(strMake, strModel, strYear, strGears)
{
AJAXBook.SportsCar.initializeBase(this, [strMake, strModel, strYear]);
this._GearCount = strGears;
this._CurrentGear = 0;
}
AJAXBook.SportsCar.prototype =
{
get_GearCount: function()
{
return this._GearCount;
},
set_GearCount: function(strGears)
{
this._GearCount = strGears;
},
get_CurrentGear: function()
{
return this.


Pages:
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99