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
    2,377
    Vote Rating
    720
      -1  

    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 User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,050
    Vote Rating
    1381
      0  

    Default

    Thanks for the report.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    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
  •