Results 1 to 3 of 3

Thread: Warning on Mobile browser but not in Desktop browser

  1. #1
    Sencha User
    Join Date
    Feb 2009
    Location
    India
    Posts
    73
    Vote Rating
    1
      0  

    Default Warning on Mobile browser but not in Desktop browser

    Using remote debugging in chrome was testing a sencha touch mvc application in android mobile.
    When application loads in the desktop browser there was no warning in the developer tool's console. But when same app was loaded in the the mobile browser it logs many warnings such as provided below
    Code:
    [WARN][Ext.Component#constructor] Registering a component with a id (`viewport`) which has already been used. Please ensure the existing component has been destroyed (`Ext.Component#destroy()`.
    the main reason why i was bothered by this warning is a doubt as objects are created multiple times in mobile device which must not happen. to remove the warning i can remove the ID and provide itemId, but that will hide the warnings but will not control the duplicate object creations .
    Is my doubt is correct or ignore the warning

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

    Default

    You are using the id config (which I would recommend against) and you are using the same one twice. You need to make sure all instances have unique ids which is why I would just let the framework do.
    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

  3. #3
    Sencha User
    Join Date
    Feb 2009
    Location
    India
    Posts
    73
    Vote Rating
    1
      0  

    Default

    Thanks mitchellsimoens,
    The problem is there is only one element, but it is some how initiated twice. Most of the view are being loaded twice but cant able to find out the reason. But cant understand why this happening only in mobile browser but not in desktop browser.
    Is there any way to find this bug in the code?

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
  •