-
-
Save ericf/1305153 to your computer and use it in GitHub Desktop.
Revisions
-
ericf revised this gist
Oct 21, 2011 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,7 +9,7 @@ Y.FooExtA = ExtA; function FooBase() {} ... Y.FooBase = Y.Base.create('foo', Y.Base, [FooBase, Y.FooExtA]); Y.Foo = Y.Base.create('foo', Y.FooBase, []); // Optional class extensions function ExtB() {} -
ericf revised this gist
Oct 21, 2011 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,11 +8,11 @@ Y.FooExtA = ExtA; // Base Class definition function FooBase() {} ... Y.FooBase = Y.Base.create('foo', Y.Base, [FooBase, Y.FooExtA]); Y.Foo = Y.FooBase; // Optional class extensions function ExtB() {} ... Y.FooExtB = ExtB; Y.Foo = Y.Base.mix(Y.Foo, [Y.FooExtB]); -
ericf revised this gist
Oct 21, 2011 . 1 changed file with 5 additions and 14 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,25 +3,16 @@ // Class extensions that will be used in the base class function ExtA() {} ... Y.FooExtA = ExtA; // Base Class definition function FooBase() {} ... Y.FooBase = Y.Base.create('foo', Y.Base, [FooBase, Y.Foo.ExtA]); Y.Foo = Y.FooBase; // Optional class extensions function ExtB() {} ... Y.FooExtB = ExtB; Y.Foo = Y.Base.mix(Y.Foo.Base, [Y.FooExtB]); -
lsmith revised this gist
Oct 21, 2011 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -22,6 +22,6 @@ Y.namespace('Foo').Base = Y.Base.create('foo', Y.Base, [], { proto }, { statics Y.Foo = Y.mix( Y.Base.create('foo', Y.Foo.Base, []), Y.Foo, true ); // Alternate for constructing the base class with extensions: Y.Foo.Base = Y.Base.create('foo', Y.Base, [], { proto }, { statics }); Y.Base.mix(Y.Foo.Base, [ Y.Foo.ExtA ]); Y.Foo = Y.mix( Y.Base.create('foo', Y.Foo.Base, []), Y.Foo, true ); -
lsmith revised this gist
Oct 21, 2011 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -22,7 +22,6 @@ Y.namespace('Foo').Base = Y.Base.create('foo', Y.Base, [], { proto }, { statics Y.Foo = Y.mix( Y.Base.create('foo', Y.Foo.Base, []), Y.Foo, true ); // Alternate for constructing the base class with extensions: Y.namespace('Foo').Base = Y.Base.create('foo', Y.Base, [], { proto }, { statics }); Y.Base.mix(Y.Foo.Base, [ Y.Foo.ExtA ]); Y.Foo = Y.mix( Y.Base.create('foo', Y.Foo.Base, []), Y.Foo, true ); -
lsmith revised this gist
Oct 21, 2011 . 1 changed file with 6 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -19,4 +19,10 @@ Y.Base.mix(Y.Foo, [ExtB]); // If there aren't any other class extensions used to define the base class Y.namespace('Foo').Base = Y.Base.create('foo', Y.Base, [], { proto }, { statics }); Y.Foo = Y.mix( Y.Base.create('foo', Y.Foo.Base, []), Y.Foo, true ); // Alternate for constructing the base class with extensions: Y.namespace('Foo').Base = Y.Base.create('foo', Y.Base, [], { proto }, { statics }); Y.Base.mix(Y.Foo.Base, [ Y.Foo.ExtA ]); Y.Foo = Y.mix( Y.Base.create('foo', Y.Foo.Base, []), Y.Foo, true ); -
lsmith renamed this gist
Oct 21, 2011 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
lsmith created this gist
Oct 21, 2011 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ // For Y.Foo // Class extensions that will be used in the base class function ExtA() {} ... Y.namespace('Foo').ExtA = ExtA; // Base Class definition function FooBase() {} ... Y.Foo.Base = Y.Base.create('foo', Y.Base, [FooBase, Y.Foo.ExtA]); Y.Foo = Y.mix( Y.Base.create('foo', Y.Foo.Base, []), Y.Foo, true ); // Optional class extensions function ExtB() {} ... Y.Foo.ExtB = ExtB; Y.Base.mix(Y.Foo, [ExtB]); // If there aren't any other class extensions used to define the base class Y.namespace('Foo').Base = Y.Base.create('foo', Y.Base, [], { proto }, { statics }); Y.Foo = Y.mix( Y.Base.create('foo', Y.Foo.Base, []), Y.Foo, true );