1. #1
    Sencha User
    Join Date
    Feb 2009
    Location
    India
    Posts
    72
    Vote Rating
    1
    arvindwill is on a distinguished road

      0  

    Default Unanswered: Warning on Mobile browser but not in Desktop browser

    Unanswered: 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 - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,547
    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


    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 @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
    Feb 2009
    Location
    India
    Posts
    72
    Vote Rating
    1
    arvindwill is on a distinguished road

      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?

Thread Participants: 1

Tags for this Thread