Results 1 to 4 of 4

Thread: Bug when building in "production" mode

  1. #1
    Sencha Premium Member
    Join Date
    Jan 2012
    Posts
    30

    Default Bug when building in "production" mode

    Hi, when I build my app for a "test" environment, all works fine, but when I build the same project for Production, I get the following error
    Uncaught TypeError: Cannot read property 'down' of undefined app.js:1Ext.cmd.derive.onSelectOwnerClick app.js:1fire app.js:1Ext.cmd.derive.dispatch app.js:1a.fireEventArgs app.js:1fireEvent app.js:1Ext.cmd.derive.fireHandler app.js:1Ext.cmd.derive.onClick app.js:1(anonymous function)

    What could be the reason for this, and how can I resolve this?


    The code in question is this :
    Code:
    Ext.define('EN.controller.repositoryController', {
        extend: 'Ext.app.Controller',
        onSelectOwnerClick: function(button, e, eOpts) {
            console.log("Selecting Owner");
            var ownerField = button.up("[xtype='window']").down("[name='owner']");
            //do other stuff
        },
        init: function(application) {
            this.control({   
                "#selectConflictOwner": {
                    click: this.onSelectOwnerClick
                }
            });
        }
    });
    Architect version info :
    version: 3.0.4.1386




    channel: 3.0.1-stable




    platform: 1.3.0.803




    cmd: 4.0.4.84




    framework: Ext JS 4.2.x

  2. #2
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,488

    Default

    Is the window getting included on the page? I'd guess you are missing a requires somewhere
    Aaron Conran
    @aconran

  3. #3
    Sencha Premium Member
    Join Date
    Jan 2012
    Posts
    30

    Default

    Well, it all works fine when building it in test mode, so I suppose all is fine. it's inside the window that the button that I press is triggering the event, so it should be there. Or are there different requirements for includes between production and test build?

  4. #4
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,488

    Default

    Look in the console when working on the test app; are there any syncRequires warnings?
    Aaron Conran
    @aconran

Posting Permissions

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