1. #1
    Sencha User
    Join Date
    Jul 2012
    Location
    New Jersey
    Posts
    116
    Vote Rating
    5
    Answers
    6
    Mike6679 is on a distinguished road

      0  

    Default Unanswered: Production Build Crashes: "Cannot call method 'on' of undefined"

    Unanswered: Production Build Crashes: "Cannot call method 'on' of undefined"


    I'm able to successfully build my app for production , however I have console errors that do not occur in a normal build . One issue was loading of stores -- I had to use:

    Code:
    var store  = Ext.create('myapp.store.' + myStore);
    store.load(function(slide){
    instead of:

    Code:
    Ext.getStore(myStore).load
    So once I resolved that now I'm running into:

    initialize:function(){

    myapp.app.on({
    imgScrolled: this.onImgScrolled,
    scope:this
    });

    "Cannot call method 'on' of undefined"

    This works perfectly fine in my normal build. Whats is the issue in production and why so many differences between the two builds?

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,548
    Vote Rating
    872
    Answers
    3566
    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


    I just generated a default app with 2.2.0 b2 and MyApp.app works for me (my name in Ext.application = 'MyApp') in testing and production builds.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Jul 2012
    Location
    New Jersey
    Posts
    116
    Vote Rating
    5
    Answers
    6
    Mike6679 is on a distinguished road

      0  

    Default


    Are my Sencha versions to blame?

    SDK: v 2.0.1.1

    SDK Tools: 2.0.0-beta3

    I really prefer not to upgrade my SDK because our app has already been QA tested. Is there any other way to fix this?

    -Mike

  4. #4
    Sencha User
    Join Date
    Jul 2012
    Location
    New Jersey
    Posts
    116
    Vote Rating
    5
    Answers
    6
    Mike6679 is on a distinguished road

      0  

    Default


    Hello Mitchell ?? Follow up answer please!

Thread Participants: 1

Tags for this Thread