You found a bug! We've classified it as TOUCH-4178 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha User
    Join Date
    Jul 2012
    Posts
    2
    Vote Rating
    0
    arisu717 is on a distinguished road

      0  

    Default mixin, inheritableStatics doesn't work

    mixin, inheritableStatics doesn't work


    <<Touch 2.1.1, Touch 2.2.0 beta>>
    mixin, inheritableStatics doesn't work.


    partial code of Ext.Base.mixin(Ext JS 4.2.0)
    Code:
                //<feature classSystem.inheritableStatics>
                // Mixin statics inheritance
                statics = mixin.$inheritableStatics;
    
    
                if (statics) {
                    for (i = 0, ln = statics.length; i < ln; i++) {
                        staticName = statics[i];
    
    
                        if (!me.hasOwnProperty(staticName)) {
                            me[staticName] = mixinClass[staticName];
                        }
                    }
                }
                //</feature>

    Touch 2.1.1, the above code is missing.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,668
    Vote Rating
    746
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Thanks for the report! I have opened a feature request in our bug tracker.

  3. #3
    Sencha - Sencha Touch Dev Team Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    19
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    In Class.js:
    Code:
        //<feature classSystem.inheritableStatics>
        /**
         * @cfg {Object} inheritableStatics
         * List of inheritable static methods for this class.
         * Otherwise just like {@link #statics} but subclasses inherit these methods.
         */
        ExtClass.registerPreprocessor('inheritableStatics', function(Class, data) {
            Class.addInheritableStatics(data.inheritableStatics);
    
            delete data.inheritableStatics;
        });
        //</feature>
    In Base.js:
    Code:
            /**
             * @private
             * @static
             * @inheritable
             */
            addInheritableStatics: function(members) {
                var inheritableStatics,
                    hasInheritableStatics,
                    prototype = this.prototype,
                    name, member;
    
                inheritableStatics = prototype.$inheritableStatics;
                hasInheritableStatics = prototype.$hasInheritableStatics;
    
                if (!inheritableStatics) {
                    inheritableStatics = prototype.$inheritableStatics = [];
                    hasInheritableStatics = prototype.$hasInheritableStatics = {};
                }
    
                //<debug>
                var className = Ext.getClassName(this);
                //</debug>
    
                for (name in members) {
                    if (members.hasOwnProperty(name)) {
                        member = members[name];
                        //<debug>
                        if (typeof member == 'function') {
                            member.displayName = className + '.' + name;
                        }
                        //</debug>
                        this[name] = member;
    
                        if (!hasInheritableStatics[name]) {
                            hasInheritableStatics[name] = true;
                            inheritableStatics.push(name);
                        }
                    }
                }
    
                return this;
            },

    Sencha Inc

    Jamie Avins

    @jamieavins

  4. #4
    Sencha User
    Join Date
    Jul 2012
    Posts
    2
    Vote Rating
    0
    arisu717 is on a distinguished road

      0  

    Default


    I had been using class Ext.BaseFixed already before posting.


    Code:
    Ext.define("Ext.BaseFixed", (function () {
        var
            //--------------------------------------------------------------------------------------------------------------
            //    static method(forward)
            //--------------------------------------------------------------------------------------------------------------
            mixin = null;
    
    
        //------------------------------------------------------------------------------------------------------------------
        //    method
        //------------------------------------------------------------------------------------------------------------------
        /**
            TODO: JSDoc
            @since        0.1
        */
        mixin = function (name, mixinClass) {
            this.callParent([name, mixinClass]);
    
    
            var me = this,
                mixin = mixinClass.prototype,
                statics, i, ln, staticName;
    
    
            //<feature classSystem.inheritableStatics>
            // Mixin statics inheritance
            statics = mixin.$inheritableStatics;
    
    
            if (statics) {
                for (i = 0, ln = statics.length; i < ln; i += 1) {
                    staticName = statics[i];
    
    
                    if (!me.hasOwnProperty(staticName)) {
                        me[staticName] = mixinClass[staticName];
                    }
                }
            }
            //</feature>
        };
    
    
        //------------------------------------------------------------------------------------------------------------------
        //    public
        //------------------------------------------------------------------------------------------------------------------
        return {
            "override": "Ext.Base",
    
    
            "statics": {
                //----------------------------------------------------------------------------------------------------------
                //    static method
                //----------------------------------------------------------------------------------------------------------
                "mixin": mixin
            }
        };
    }()));

    Once the bug is fixed, I will not use it.

  5. #5
    Sencha User
    Join Date
    Jun 2009
    Posts
    102
    Vote Rating
    6
    campersau1 is on a distinguished road

      0  

    Default


    Any news on the status of this issue?

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar