Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJSIV-8293 in 4.2.0 Sprint 3.
  1. #1
    Sencha - Community Support Team mankz's Avatar
    Join Date
    Nov 2007
    Location
    Helsingborg, Sweden
    Posts
    2,455
    Vote Rating
    50
    mankz is a jewel in the rough mankz is a jewel in the rough mankz is a jewel in the rough

      0  

    Default [4.2.0.265] Lockable mixin plugin treatment

    [4.2.0.265] Lockable mixin plugin treatment


    I think the constructLockablePlugins is doing a bit too much work. It's _always_ cloning a plugin, which means it copies the config properties used in the plugin constructor. For any slightly more advanced plugin which sets itself up in the 'init' method, this doesn't work.


    Original version:
    Code:
    constructLockablePlugins: function() {
            var plugins = this.plugins,
                plugin,
                normalPlugin,
                lockedPlugin,
                topPlugins,
                lockedPlugins,
                normalPlugins,
                i = 0, len,
                destroyPlugin;
    
            if (plugins) {
                topPlugins = [];
                lockedPlugins = [];
                normalPlugins = [];
                len = plugins.length;
                for (; i < len; i++) {
                    
                    plugin = plugins[i];
    
                    
                    
                    destroyPlugin = true;
    
                    switch (plugin.lockableScope) {
                        case 'both':
                            lockedPlugins.push(lockedPlugin = plugin.clonePlugin());
                            normalPlugins.push(normalPlugin = plugin.clonePlugin());
    
                            
                            lockedPlugin.lockingPartner = normalPlugin;
                            normalPlugin.lockingPartner = lockedPlugin;
                            break;
                        case 'locked':
                            lockedPlugins.push(plugin.clonePlugin());
                            break;
                        case 'normal':
                            normalPlugins.push(plugin.clonePlugin());
                            break;
                        default:
                            destroyPlugin = false;
                            topPlugins.push(plugin);
                    }
    
                    
                    if (destroyPlugin) {
                        Ext.destroy(plugin);
                    }
                }
            }
            return {
                topPlugins:    topPlugins,
                normalPlugins: normalPlugins,
                lockedPlugins: lockedPlugins
            };
        }
    Could be:

    Code:
    constructLockablePlugins: function() {
            var plugins = this.plugins,
                plugin,
                normalPlugin,
                lockedPlugin,
                topPlugins,
                lockedPlugins,
                normalPlugins,
                i = 0, len;
    
            if (plugins) {
                topPlugins = [];
                lockedPlugins = [];
                normalPlugins = [];
                len = plugins.length;
                for (; i < len; i++) {
                    
                    plugin = plugins[i];
    
                    switch (plugin.lockableScope) {
                        case 'both':
                            lockedPlugins.push(lockedPlugin = plugin.clonePlugin());
                            normalPlugins.push(normalPlugin = plugin.clonePlugin());
                            
                            lockedPlugin.lockingPartner = normalPlugin;
                            normalPlugin.lockingPartner = lockedPlugin;
                            break;
                        case 'locked':
                            lockedPlugins.push(plugin);
                            break;
                        case 'normal':
                            normalPlugins.push(plugin);
                            break;
                        default:
                            topPlugins.push(plugin);
                    }
                }
            }
            return {
                topPlugins:    topPlugins,
                normalPlugins: normalPlugins,
                lockedPlugins: lockedPlugins
            };
        }
    In this case, all positions are 'safe' except the 'both' version where 2 clones are used.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    33,624
    Vote Rating
    435
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


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