-
15 Jan 2013 7:43 AM #1
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
-
17 Jan 2013 6:39 AM #2
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
you don't need to include the "Ext.DataView" component in your view requires array, but you have to include the "Ext.TitleBar".Code:Ext.define('My.view.Test', { extend: 'Ext.DataView', items: [ { xtype: 'titlebar', title: 'Hello' } ] });
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
CEO at SIMACS
@AndreaCammarata
www.andreacammarata.com
github: https://github.com/AndreaCammarata
-
17 Jan 2013 7:20 AM #3
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...
-
17 Jan 2013 7:23 AM #4
I agree, there's no doubts it could be more specific.
Sencha Inc
Andrea Cammarata, Solutions Engineer
CEO at SIMACS
@AndreaCammarata
www.andreacammarata.com
github: https://github.com/AndreaCammarata


Reply With Quote