Results 1 to 2 of 2

Thread: Checking for existence, before destroying appLoadingIndicator in the generated code.

  1. #1
    Sencha User
    Join Date
    Feb 2013
    Posts
    1
    Vote Rating
    0
      0  

    Default Checking for existence, before destroying appLoadingIndicator in the generated code.

    Hello all,

    I'm using Sencha Cmd v3.0.2.288.

    Line #37 of the app.js of the freshly generated application is removing appLoadingIndicator once the application is laucnhed:
    Code:
     Ext.fly('appLoadingIndicator').destroy();
    I think it would be great to check if the DOM element exists. e.g. before working with it.

    Code:
     
    var appLoadingIndicator = Ext.fly( 'appLoadingIndicator' );   
    if( appLoadingIndicator ) {
        appLoadingIndicator.destroy()
    }
    This change prevents users from getting errors when running the app in another environment, e.g. automated testing.

    I understand that this change is really needed for few specific cases, but it would really nice to have it.

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Vote Rating
    1272
      0  

    Default

    This is application specific. The default app has it as it has the loading indicators but if you remove them then it would be up to you to remove the Ext.fly call.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

Tags for this Thread

Posting Permissions

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