Results 1 to 2 of 2

Thread: [4.1.] Ext.app.Controller.ref - correct me.references initialization

    Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJS-6673 in a recent build.
  1. #1
    Sencha Premium User
    Join Date
    Nov 2010
    Location
    Chicago
    Posts
    1,932
    Vote Rating
    548
      0  

    Default [4.1.] Ext.app.Controller.ref - correct me.references initialization

    The me.references initialization should be placed before the for loop.

    It doesn't look right to initialize it inside the loop.

    Code:
    Ext.define('Ext.app.Controller', {
        ...
        ref: function(refs) {
            ...
            for (; i < length; i++) {
                info = refs[i];
                ref  = info.ref;
                fn   = 'get' + Ext.String.capitalize(ref);
    
    
                if (!me[fn]) {
                    me[fn] = Ext.Function.pass(me.getRef, [ref, info], me);
                }
                me.references = me.references || []; // <-- move this initialization before the for loop
                me.references.push(ref.toLowerCase());
            }
        },
        ....

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,553
    Vote Rating
    1272
      0  

    Default

    Thanks for the report.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •