1. #1
    Sencha User
    Join Date
    Sep 2011
    Posts
    38
    Vote Rating
    1
    howHardCanItBe is on a distinguished road

      0  

    Default Unanswered: issues with Ext.getBody when using define

    Unanswered: issues with Ext.getBody when using define


    Hi, I use Ext.getBody().getViewSize().width to set width in several configs in some nested panels. This worked fine when I just did a simple create of the panel. When I put my panel in a define and use it later in a index.js I get the error Uncaught Error: [Ext.getBody] document.body does not exist at this point . The error makes sense, but I don't know how to work around it.


    Code:
            Ext.Loader.setConfig({ enabled: true });
            Ext.require('MainPage');
            Ext.create('MainPage');

  2. #2
    Sencha - Sencha Touch Dev Team rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,158
    Answers
    93
    Vote Rating
    6
    rdougan will become famous soon enough

      0  

    Default


    Put it inside a Ext.setup or Ext.application onReady callback function. Then, when your class is created, the documents body will exist.

    Code:
    Ext.setup(function() {
        onReady: function() {
            Ext.create('MyClass');
        }
    });
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar