1. #1
    Sencha Premium Member
    Join Date
    Mar 2008
    Posts
    145
    Vote Rating
    2
    Answers
    6
    kworam is on a distinguished road

      0  

    Default Unanswered: Sencha 2.2.0 alpha: document.body does not exist at this point

    Unanswered: Sencha 2.2.0 alpha: document.body does not exist at this point


    Let me start off by saying that I am very glad Sencha will be supporting IE10 and Windows 8 / Phone 8!

    As soon as I heard about ST2.2 alpha, I downloaded it and have started porting my ST2 app to it using Visual Studio 2012. I am running my ST2.2 alpha app in the Visual Studio 2012 debugger which launches IE10 and attempts to display 'index.html'. When my "new Ext.application({ ... " code runs, it causes a long stack of function calls that end in a call to the 'getBody' function (see below) which throws the "[Ext.getBody] document.body does not exist at this point" Error.

    Am I doing something wrong here? Is this the right place to report ST 2.2 alpha bugs?

    Code:
        getBody: function() {
            if (!Ext.documentBodyElement) {
                if (!document.body) {
                    throw new Error("[Ext.getBody] document.body does not exist at this point");
                }
    
                Ext.documentBodyElement = Ext.get(document.body);
            }
    
            return Ext.documentBodyElement;
        },

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,642
    Vote Rating
    899
    Answers
    3574
    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 shouldn't have new Ext.application, just Ext.application. Also, 2.2.0 alpha shouldn't be used for any production code because you are going to run into issues, just be playing with the alpha build.
    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.

Thread Participants: 1