2015-01-09 21 views

回答

2
Ext.define('Mother', { 
    uses: ['Child'], 
    giveBirth: function() { 
     // This code might, or might not work: 
     // return new Child(); 

     // Instead use Ext.create() to load the class at the spot if not loaded already: 
     return Ext.create('Child'); 
    } 
}); 

名單選修課程中與此類一起加載。這些類在創建這個類之前並不需要加載,但在調用Ext.onReady偵聽器之前保證可用。