BaseBuild.js revision 969d790cf689400dd37fcf1f11c1909a66c06de9
d2a5a45ff58ab15a8ee0339edcd03f0243373d59Dav Glass * The base-build submodule provides Base.build functionality, which
d2a5a45ff58ab15a8ee0339edcd03f0243373d59Dav Glass * can be used to create custom classes, by aggregating extensions onto
d2a5a45ff58ab15a8ee0339edcd03f0243373d59Dav Glass * a main class.
d2a5a45ff58ab15a8ee0339edcd03f0243373d59Dav Glass * @module base
d2a5a45ff58ab15a8ee0339edcd03f0243373d59Dav Glass * @submodule base-build
d2a5a45ff58ab15a8ee0339edcd03f0243373d59Dav Glass Base._build = function(name, main, extensions, px, sx, cfg) {
d2a5a45ff58ab15a8ee0339edcd03f0243373d59Dav Glass // Prototype, old non-displacing augment
d2a5a45ff58ab15a8ee0339edcd03f0243373d59Dav Glass // Custom Statics
d2a5a45ff58ab15a8ee0339edcd03f0243373d59Dav Glass _mixCust(builtClass, extClass, aggregates, custom);
d2a5a45ff58ab15a8ee0339edcd03f0243373d59Dav Glass Y.mix(builtClass, build._clean(sx, aggregates, custom), true);
5432371fbb6d790a76159481f0dd16e806812153Dav Glass for (var j in custom) {
5432371fbb6d790a76159481f0dd16e806812153Dav Glass custom[j](j, r, s);
d2a5a45ff58ab15a8ee0339edcd03f0243373d59Dav Glass BuiltClass.superclass.constructor.apply(this, arguments);
d2a5a45ff58ab15a8ee0339edcd03f0243373d59Dav Glass var classes = this._getClasses(), i, l, cls, exts, ll, j;
d2a5a45ff58ab15a8ee0339edcd03f0243373d59Dav Glass return true;
d2a5a45ff58ab15a8ee0339edcd03f0243373d59Dav Glass return false;
d2a5a45ff58ab15a8ee0339edcd03f0243373d59Dav Glass var dynamic = (cfg && false === cfg.dynamic) ? false : true,
d2a5a45ff58ab15a8ee0339edcd03f0243373d59Dav Glass builtClass = (dynamic) ? build._tmpl(main) : main;
d2a5a45ff58ab15a8ee0339edcd03f0243373d59Dav Glass while (c && c.prototype) {
d2a5a45ff58ab15a8ee0339edcd03f0243373d59Dav Glass c = c.superclass ? c.superclass.constructor : null;
return sxclone;
* @param {Function} name The name of the new class. Used to defined the NAME property for the new class.
* augmented/aggregated to the built class.
* <p>Creates a new class (constructor function) which extends the base class passed in as the second argument,
* <p>Prototype properties or methods can be added to the new class, using the px argument (similar to Y.extend).</p>
* <p>Static properties or methods can be added to the new class, using the sx argument (similar to Y.extend).</p>
* @param {Function} name The name of the newly created class. Used to defined the NAME property for the new class.
* @param {Function} main The base class which the new class should extend. This class needs to be Base or a class derived from base (e.g. Widget).
* @param {Function} main The existing class into which the extensions should be mixed. The class needs to be Base or class derived from base (e.g. Widget)
* @param {Function[]} extensions The set of extension classes which will mixed into the existing main class.
custom : {
if (s[prop]) {