Hybrid View

  1. #1
    Ext JS Premium Member
    Join Date
    Apr 2007
    Posts
    289
    Vote Rating
    0
    jheid is on a distinguished road

      0  

    Default xtypes and Ext.require

    xtypes and Ext.require


    Hi.

    Well, there are the xtypes which are IMHO a good way to define your component tree (as they are created on demand).

    But I cannot understand why the built-in ExtJS widgets are registered to the Ext.Loader. It would be good if there's a registration for xtypes like

    Ext.registerClassForXType ('grid', 'Ext.grid.Panel');

    So, if an xtype isn't found and Ext.Loader is activated the class will be loaded first. The standard widgets should be registered by default.

    It seems that Ext.ClassManager.instantiateByAlias does this. It's not used internally I think. Why?

    P.S.: Same problem exists with layouts as "layout:'border'" does not work without an Ext.require.

  2. #2
    Sencha - Sencha Touch Dev Team Jacky Nguyen's Avatar
    Join Date
    Jul 2009
    Location
    Palo Alto, California
    Posts
    469
    Vote Rating
    13
    Jacky Nguyen has a spectacular aura about Jacky Nguyen has a spectacular aura about

      0  

    Default


    Use Ext.ClassManger.setAlias, i.e

    Code:
    Ext.ClassManager.setAlias('My.awesome.Widget', 'mine');
    
    // Then later on in your application's code
    
    var mine = Ext.create('mine'); // Will automatically load 'My.awesome.Widget' if it doesn't exist yet
    Sencha Touch Lead Architect

  3. #3
    Ext JS Premium Member
    Join Date
    Apr 2007
    Posts
    289
    Vote Rating
    0
    jheid is on a distinguished road

      0  

    Default


    Ehm, yes, but why isn't it used for ExtJS base widgets, i.e. form elements?

Similar Threads

  1. Do you require full RTL support? Vote now!
    By noamway in forum Community Discussion
    Replies: 66
    Last Post: 4 Aug 2012, 11:19 PM
  2. require on Ext JS 4
    By slmbakop in forum Ext: Discussion
    Replies: 0
    Last Post: 9 Mar 2011, 7:13 AM
  3. Is there any require or include function ?
    By stevanovich in forum Ext 1.x: Help & Discussion
    Replies: 5
    Last Post: 17 Oct 2008, 5:27 AM
  4. [2.0ax] - Docs require extjs.com, please make local
    By jay@moduscreate.com in forum Ext 2.x: Bugs
    Replies: 10
    Last Post: 15 Oct 2007, 1:59 PM
  5. looks like the next release will require yui 0.12
    By jbowman in forum Community Discussion
    Replies: 0
    Last Post: 8 Dec 2006, 4:15 PM

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