REQUIRED INFORMATION Architect Build tested:
  • Build: 908
Project Type:
  • ExtJS 4.1
Description:
  • I have various actions that should call the same function already defined and assigned to another action. However, when I attempt to assign my second action the same function name, it returns an error: "This handler name (fn) is already in use or is reserved. Please use a unique name."
  • Why is this required? Why should I have to create several functions that do nothing more than reference another function? Why can I not simply have the action call the existing function directly. When I type the code out manually, it works in ExtJS 4.0 & 4.1...
  • This is what I'm trying to get SA to produce:
    PHP Code:
        init: function () {
            if (
    Ext.isGecko && debug){ console.log(" usrMangerTAB.controllerInit()"); }
            var 
    me=this;

            
    this.control({
                
    'panel[itemId=usrMangerTAB]': { //tabPanel object
                    
    containercontextmenume.cancelContextMenu
                
    },
                
    '[itemId=UserViewPanelGrpAdd]': {
                    
    clickme.userViewPanelGrpAddOnClick,
                    
    contextmenume.cancelContextMenu
                
    },
                
    '[itemId=UserViewPanelGrpDel]': {
                    
    clickme.userViewPanelGrpDelOnClick
                
    },
                
    '[itemId=UserViewPanelGrpSaves]': {
                    
    clickme.UserViewPanelGrpSavesOnClick
                
    },
                
    '[itemId=UserViewPanelGrpBBSaves]': {
                    
    clickme.UserViewPanelGrpSavesOnClick
                
    },
                
    '[itemId=UserViewPanelGrpReload]': {
                    
    clickme.UserViewPanelGrpReloadOnClick
                
    },
                
    '[itemId=UserViewPanelGrpForget]': {
                    
    clickme.UserViewPanelGrpForgetOnClick
                
    },
                
    '[itemId=UserViewPanelGrpBBForget]': {
                    
    clickme.UserViewPanelGrpForgetOnClick
                
    },
                
    '[itemId=grpViewPanel]': {//grid object
                    
    itemcontextmenume.grpViewPanelRclk,
                    
    containercontextmenume.cancelContextMenu
                
    },


    //// the rest of the controller continues on... 
Steps to reproduce the problem:
  • Create view components and controller
  • reference view components
  • create controller action for each component (in my case a toolbar button)
  • Since both buttons perform the same function, assign same function (glue) name.
  • See error
The result that was expected:
  • Should allow the action to be assoicated with any existing function without forcing a new function to be created.
The result that occurs instead:
  • annoying error
HELPFUL INFORMATION Screenshot, Project, or Video:
  • n/a
Possible fix:
  • If the referenced function is an existing function name, simply tie the action to that function. Don't try to create a new controller function with same name...
Operating System:
  • OSX 10.8.3