1. #1
    Sencha User
    Join Date
    Nov 2010
    Posts
    407
    Vote Rating
    6
    gkatz is on a distinguished road

      0  

    Default class loading suggestions written to console

    class loading suggestions written to console


    Hi;
    when not requiring classes used by ST I usually get the following:
    ARN][Anonymous] [Ext.Loader] Synchronously loading 'Ext.dataview.DataView'; consider adding 'Ext.dataview.DataView' explicitly as a require of the corresponding class

    problem is, I have many classes with inheritance and I never know in which class I should put the requires. I just try until it works. is there a way to know exactly which class I should put the requires statement in?
    thanks

  2. #2
    Sencha - Services Team AndreaCammarata's Avatar
    Join Date
    Jun 2009
    Posts
    1,395
    Vote Rating
    23
    AndreaCammarata has a spectacular aura about AndreaCammarata has a spectacular aura about

      0  

    Default


    You should only include the required components that your view is currently using as child items but you don't need to do the same for the component your view is extending.
    For instance, if you are creating the view

    Code:
    Ext.define('My.view.Test', {
       extend: 'Ext.DataView',
       items: [
           {
                xtype: 'titlebar',
                title: 'Hello'
           }
       ]
    });
    you don't need to include the "Ext.DataView" component in your view requires array, but you have to include the "Ext.TitleBar".
    If you see the warning message related to a particular component require missing but you don't know which class uses it, you can simply start to search for it in your project, and if a class uses it as an item or create it "on the fly" somewhere in the class code, this class needs to have it included in the requires array.
    Sencha Inc
    Andrea Cammarata, Solutions Engineer
    Owner at SIMACS

    @AndreaCammarata
    www.andreacammarata.com
    github: https://github.com/AndreaCammarata

    TUX components bundle for Sencha Touch 2.x.x
    https://github.com/AndreaCammarata/TUX


  3. #3
    Sencha User
    Join Date
    Nov 2010
    Posts
    407
    Vote Rating
    6
    gkatz is on a distinguished road

      0  

    Default


    thanks.
    i still think that if possible the message should be more specific...
    when many classes are loaded I find it hard to pin point the exact class I need to add the requires in...

  4. #4
    Sencha - Services Team AndreaCammarata's Avatar
    Join Date
    Jun 2009
    Posts
    1,395
    Vote Rating
    23
    AndreaCammarata has a spectacular aura about AndreaCammarata has a spectacular aura about

      0  

    Default


    I agree, there's no doubts it could be more specific.
    Sencha Inc
    Andrea Cammarata, Solutions Engineer
    Owner at SIMACS

    @AndreaCammarata
    www.andreacammarata.com
    github: https://github.com/AndreaCammarata

    TUX components bundle for Sencha Touch 2.x.x
    https://github.com/AndreaCammarata/TUX


Thread Participants: 1

Tags for this Thread