1. #1
    Sencha User
    Join Date
    Apr 2011
    Posts
    35
    Vote Rating
    0
    chepac is on a distinguished road

      0  

    Default Always same Error : Ext.Loader is not enabled

    Always same Error : Ext.Loader is not enabled


    Hello !

    I don't understand why i have this error :
    Erreur : uncaught exception: Ext.Loader is not enabled, so dependencies cannot be resolved dynamically. Missing required class: Ext.Tree.TreePanel
    My code :

    Code:
    Ext.require([
    
        'Ext.form.*',
        'Ext.grid.*',
        'Ext.tree.*',
        'Ext.data.*',
        'Ext.util.*',
        'Ext.loader.*',
        'Ext.state.*',
        'Ext.layout.container.Column',
        'Ext.tab.TabPanel'
        
    ]);
    
    Ext.onReady(function(){
        
    
            // shorthand
     Ext.QuickTips.init();
            var Tree = Ext.tree;
    
            var tree = Ext.create('Ext.Tree.TreePanel', {
                    animate:false,
                    enableDD:false,
            //        loader: new Tree.TreeLoader(), // Note: no dataurl, register a TreeLoader to make use of createNode()
                    lines: true,
                    rootVisible:false,
                //    selModel: new Ext.tree.MultiSelectionModel(),
                    containerScroll: false
            });
    
                // set the root node
                var root = Ext.create('Ext.Tree.TreeNode',{
                    text: 'Autos',
                    draggable:false,
                    id:'source'
                });
    
                tree.on('contextmenu',showCtx);
                tree.on('click',function(node,e){node.select();return false;});
                // json data describing the tree
    
                var json = [
                        {"text" : "1","allowEdit" : true, "id" : 300, "leaf" : false, "cls" : "folder", "children" : [
                        {"text" : "11","allowEdit" : true, "id" : 3000, "leaf" : false, "cls" : "folder","children" :[
                        {"text" : "111","allowEdit" : true, "id" : 300, "leaf" : false, "cls" : "folder","children" :[
                        {"text" : "1111","allowEdit" : true, "id" : 300, "leaf" : true, "cls" : "file"},
                        {"text" : "1112","allowEdit" : true, "id" : 300, "leaf" : true, "cls" : "file"},
                        {"text" : "1113","allowEdit" : true, "id" : 300, "leaf" : true, "cls" : "file"}
                        ]},
                        {"text" : "112","allowEdit" : true, "id" : 300, "leaf" : true, "cls" : "file"},
                        {"text" : "113","allowEdit" : true, "id" : 300, "leaf" : true, "cls" : "file"}
                        ]},
                        {"text" : "12","allowEdit" : true, "id" : 300, "leaf" : true, "cls" : "file"},
                        {"text" : "13","allowEdit" : true, "id" : 300, "leaf" : true, "cls" : "file"}
                        ]},
                        {"text" : "2","allowEdit" : true, "id" : 300, "leaf" : true, "cls" : "file"},
                        {"text" : "3","allowEdit" : true, "id" : 300, "leaf" : true, "cls" : "file",iconCls:'node'}
                        ];
    
                        for(var i = 0, len = json.length; i < len; i++) {
                        root.appendChild(tree.getLoader().createNode(json[i]));
                        }
    
                var ge = Ext.create('Ext.Tree.TreeEditor',tree,{
                    allowBlank:false,
                    blankText:'Nom du dossier',
                    selectOnFocus:true,
                    cancelOnEsc:true,
                    completeOnEnter:true,
                    ignoreNoChange:true,
                    updateEl:true
                    });
                    ge.on('beforestartedit', function(){
                    if(!ge.editNode.attributes.allowEdit){
                    return false;
                    }
                });
    
                tree.setRootNode(root);
                tree.render();
                root.expand(true);
    
                });

    Thanks

  2. #2
    Ext JS Premium Member stevil's Avatar
    Join Date
    Nov 2007
    Location
    Denver, CO
    Posts
    1,045
    Vote Rating
    9
    stevil will become famous soon enough

      0  

    Default


    PHP Code:
    Ext.Loader.setConfig({ enabledtrue });
    // if your page is located directly above the Ext JS folder:
    Ext.Loader.setPath('Ext''./ext-4.0-beta3');
    Ext.Loader.setPath('Ext.ux''./ext-4.0-beta3/examples/ux');
     
    Ext.require([
     
        
    'Ext.form.*',
        
    'Ext.grid.*',
        
    'Ext.tree.*',
        
    'Ext.data.*',
        
    'Ext.util.*',
        
    'Ext.loader.*',
        
    'Ext.state.*',
        
    'Ext.layout.container.Column',
        
    'Ext.tab.TabPanel'
    ]); 
    Also, see the doc for Ext.Loader - it has a lot of great detail!

    stevil

Similar Threads

  1. Replies: 2
    Last Post: 18 Apr 2011, 5:09 AM
  2. [2.1.0] Loader javadoc error
    By micgala in forum Ext GWT: Bugs (2.x)
    Replies: 0
    Last Post: 2 Feb 2010, 2:41 AM
  3. XML Tree Loader (POST) error?
    By CR_RedFox in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 24 Oct 2008, 6:53 AM

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..." hd porno faketaxi