开发者

Deployment Error with Sencha SDK Tool

开发者 https://www.devze.com 2023-03-21 00:18 出处:网络
I\'m trying to deploy my extJS-Application, which is in MVC-Architecture style. As described in the extJS Docs I\'ve first 开发者_JAVA技巧tried to generate a JSB3 File with sencha create jsb -a index.

I'm trying to deploy my extJS-Application, which is in MVC-Architecture style. As described in the extJS Docs I've first 开发者_JAVA技巧tried to generate a JSB3 File with sencha create jsb -a index.html -p app.jsb3. Sadly I've got the following error: undefined:0 TypeError: 'null' is not a constructor

I'm working on MAC OS X with Sencha Command v1.2.2.

Thanks for any help!


got the same error. On windows 7. Ext 4.0.2. Not sure how to troubleshoot this.


make sure that you include ext-dev.js in your app and you don't have any warnings/errors in Firebug/WebInspector.

Also check this thread: [SDKTOOLS-3] buggy Sencha SDK Tools


Two days ago I was suffering such type of problem. Due to my absent mind I forgot to requires some of Ext or Ext.ux class. So think some of your Extjs Class may be missing. just requires it as I pointed or add these library to your Controller/Viewport/View/Store.

Ext.Loader.setConfig({
    enabled : enabled
});
Ext.Loader.setPath('Your.ns', 'app');
Ext.Loader.setPath('Ext.ux', 'ux');
Ext.require([
    'Ext.grid.*',
    'Ext.data.*',
    'Ext.ModelMgr.*',
    'Ext.panel.Panel',
    'Ext.button.Button',
    'Ext.window.Window',  
    'Ext.toolbar.TextItem',
    'Ext.menu.Menu',
    'Ext.toolbar.Spacer',
    'Ext.button.Split',
    'Ext.form.field.TextArea',
    'Ext.toolbar.Paging', 
    'Ext.ModelManager',
    'Ext.tip.QuickTipManager',
    'Ext.tree.Column',
    'Ext.tree.Panel',
    'Ext.tree.View',
    'Ext.Loader',
    //..........................................
    // --Your Missing require library add here--
    //................................... ......
    'Ext.ux.grid.RowEditor',
    'Ext.ux.data.PagingMemoryProxy',
    'Ext.ux.PreviewPlugin',
    'Ext.ux.ProgressBarPager',
    'Ext.ux.statusbar.StatusBar',
]);

Ext.application({
    name        : 'Your.ns', 
    appFolder   : 'app',
    controllers : ['Your controllers'],
    models      : ['Your models'],
    stores      : ['Your stores'],
    views       : ['Your views'],
    launch      : function() {
        //TODO
    },
    autoCreateViewport: true
});

or add your missing class in requires array

Ext.define('Your.ns.controller.YourController', {
    extend      : 'Ext.app.Controller', 
    requires    : ['your required class1 here', 'your required class2 here'],
    views       : [],

    refs        : [{
           ref      : '',
           selector : 'window'
    }],

    init       : function() {        
           this.control({ 
              // your action
           });
        },
        //your code here
});

I think this code may be helpful.

0

精彩评论

暂无评论...
验证码 换一张
取 消