Page 1 of 4 123 ... LastLast
Results 1 to 10 of 31

Thread: Ext.Msg.alert in production build

  1. #1
    Sencha User
    Join Date
    Apr 2013
    Posts
    58
    Answers
    2

    Default Answered: Ext.Msg.alert in production build

    I'm having trouble with a simple Ext.Msg.alert in production build. It works fine in dev microloader, in development build and in testing build, not showing any warnings or anything... it only fails in production build with message "undefined is not a function".

    I've required 'Ext.MessageBox' in the app.

    This is the call stack i get in chrome devtools source debugging:

    call_stack.jpg

    Thanks in advance

  2. Ok that is what I suspected. I wouldn't use Cmd 5 with Sencha Touch at this time. You should downgrade to Cmd 4.0.4.84.

  3. #2
    Sencha User jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    DC Area =)
    Posts
    16,364
    Answers
    102

    Default

    You Most likely need to require the Ext.Messagebox class in your application.

  4. #3
    Sencha User
    Join Date
    Apr 2013
    Posts
    58
    Answers
    2

    Default

    Thanks for the reply, but like i said, i already did:Ext.application({ name: 'Mobile', appFolder: 'app', requires: [ 'Ext.MessageBox' ],...

  5. #4
    Sencha User jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    DC Area =)
    Posts
    16,364
    Answers
    102

    Default

    try executing "sencha app refresh" at the CLI and rebuild. This makes no sense.

    Open up the console when you hit your exception and see if Ext.Msg is even defined.

  6. #5
    Sencha User
    Join Date
    Apr 2013
    Posts
    58
    Answers
    2

    Default

    Sorry for the delayed response. I'm still stucked here... i had to make every alert i wanted to show as an overlay with an "accept" button... Ext.Msg is still a dead end.


    I insist on this, it only fails in production build, development and testing work just fine, and shows no warnings.


    Jay, I did the refresh and still nothing. I enter Ext.Msg in the console and it appears to be defined, so....


    here's the image of the console:

    ExtMsg.jpg

  7. #6
    Sencha User jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    DC Area =)
    Posts
    16,364
    Answers
    102

    Default

    OK. So if you did Ext.Msg.alert('foo', 'bar') in the console via a production build.... does that still throw the exception?

  8. #7
    Sencha User
    Join Date
    Apr 2013
    Posts
    58
    Answers
    2

    Default

    Exactly:Ext.Msg.alert('foo','bar')TypeError: undefined is not a function

  9. #8
    Sencha User jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    DC Area =)
    Posts
    16,364
    Answers
    102

    Default

    how about : typeof Ext.Msg.alert

  10. #9
    Sencha User
    Join Date
    Apr 2013
    Posts
    58
    Answers
    2

    Default

    typeof Ext.Msg.alert
    "function"

    Ext.Msg.alert
    function (d,c,b,a){return this.show({title:d||null,message:c||null,buttons:Ext.MessageBox.OK,promptConfig:false,fn:function(){if(b){b.apply(a,arguments)}},scope:a})}

    Ext.Msg.alert('foo','bar');
    TypeError: undefined is not a function

    this is really confusing...

  11. #10
    Sencha - Support Team
    Join Date
    Oct 2011
    Posts
    4,108
    Answers
    342

    Default

    What version of Sencha Cmd are you using?
    Get more personalized support via a support subscription.

    Need more help with your app? Hire Sencha Services [email protected]

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

    Need to include a test case use:
    The official Sencha Fiddle

Page 1 of 4 123 ... LastLast

Posting Permissions

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