[#5] Added 'virtual' and 'override' keywords to inheritance example in manual; will continue revisions in following commits
- This needs to be corrected as it's a very important detail. However, I need to get to bed. So the remaining changes will simply need to wait.closure/master
parent
ed7e988c00
commit
6452a239f3
|
@ -524,7 +524,7 @@ ease.js?
|
||||||
// our parent class (supertype)
|
// our parent class (supertype)
|
||||||
var Dog = Class( 'Dog',
|
var Dog = Class( 'Dog',
|
||||||
{
|
{
|
||||||
'public walk': function()
|
'virtual public walk': function()
|
||||||
{
|
{
|
||||||
console.log( 'Walking the dog' );
|
console.log( 'Walking the dog' );
|
||||||
},
|
},
|
||||||
|
@ -538,7 +538,7 @@ ease.js?
|
||||||
// subclass (child), as a named class
|
// subclass (child), as a named class
|
||||||
var LazyDog = Class( 'LazyDog' ).extend( Dog,
|
var LazyDog = Class( 'LazyDog' ).extend( Dog,
|
||||||
{
|
{
|
||||||
'public walk': function()
|
'override public walk': function()
|
||||||
{
|
{
|
||||||
console.log( 'Lazy dog refuses to walk.' );
|
console.log( 'Lazy dog refuses to walk.' );
|
||||||
}
|
}
|
||||||
|
@ -547,7 +547,7 @@ ease.js?
|
||||||
// subclass (child), as an anonymous class
|
// subclass (child), as an anonymous class
|
||||||
var TwoLeggedDog = Dog.extend(
|
var TwoLeggedDog = Dog.extend(
|
||||||
{
|
{
|
||||||
'public walk': function()
|
'override public walk': function()
|
||||||
{
|
{
|
||||||
console.log( 'Walking the dog on two feet' );
|
console.log( 'Walking the dog on two feet' );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue