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

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..."