Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJS-8293 in a recent build.
  1. #1
    Sencha - Community Support Team mankz's Avatar
    Join Date
    Nov 2007
    Location
    Stockholm, Sweden
    Posts
    2,761
    Vote Rating
    108
    mankz is a name known to all mankz is a name known to all mankz is a name known to all mankz is a name known to all mankz is a name known to all mankz is a name known to all

      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
    Gainesville, FL
    Posts
    37,342
    Vote Rating
    847
    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 bug in our bug tracker.

Thread Participants: 1