Creating all classes from sencha sdk

I am trying to use sencha sdk to create my miniature file.

I have my page set to

http: //www.mysite.localhost/ext/jobs/index.html

reading only from index.html is not so simple. When i enter

sencha create jsb -a http://www.mysite.localhost/ext/jobs/index.html -p app.jsb3

I get the following jsb file.

{
    "projectName": "Project Name",
    "licenseText": "Copyright(c) 2011 Company Name",
    "builds": [
        {
            "name": "All Classes",
            "target": "all-classes.js",
            "options": {
                "debug": true
            },
            "files": []
        },
        {
            "name": "Application - Production",
            "target": "app-all.js",
            "compress": true,
            "files": [
                {
                    "path": "",
                    "name": "all-classes.js"
                },
                {
                    "path": "",
                    "name": "app.js"
                }
            ]
        }
    ],
    "resources": []
}

those. he did not include all my classes. If i update

"path": "app /", "name": "app.js"

app-all.js is created correctly. But how can I get controllers and views. There are a lot of files. Does anyone have an example mvc jsb application. My application is based on Pandora.

app / app.js

    Ext.Loader.setConfig({ enabled: true });
    Ext.application({

        name: 'Pandora',
        models: ['Part', 'Material', 'Job', 'Process', 'Invoice', 'InvoiceDetail', 'PurchaseOrder'],
        stores: ['SalesContact', 'Parts', 'Materials', 'Jobs', 'AccountHandlers', 'JobTypes', 'Processs', 'Artwork', 'Varnish', 'VarnishType', 'PrintType', 'ProofRequired', 'InvoiceDetails', 'PurchaseOrders'],
  controllers: ['Part', 'Material', 'Job', 'Process', 'Invoice'],
        launch: function () {

            Ext.QuickTips.init();
            var cmp1 = Ext.create('App.view.Jobs', {
                renderTo: "form-job"
            });
            cmp1.show();
        }

    });

index.html

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <script type="text/javascript" src="ext-all-debug.js"></script>
    <script type="text/javascript" src="app/app.js"></script>
</head>
<body>
    <div id="form-job"></div>
</body>
</html>
+5
source share
1 answer

Update

Ext.Loader() app.js. , Ext.Loader() Viewport. , : :. , jsb3 .

. Ext.Loader() app.js. , , . , . app/app.js.

Ext.Loader.setConfig({ enabled: true });

// SDK builder required source files, use the class names.
Ext.Loader.require(['Pandora.view.Viewport']);

Ext.application({

    name: 'Pandora',
    models: ['Part', 'Material', 'Job', 'Process', 'Invoice', 'InvoiceDetail', 'PurchaseOrder'],
    stores: ['SalesContact', 'Parts', 'Materials', 'Jobs', 'AccountHandlers', 'JobTypes', 'Processs', 'Artwork', 'Varnish', 'VarnishType', 'PrintType', 'ProofRequired', 'InvoiceDetails', 'PurchaseOrders'],
    controllers: ['Part', 'Material', 'Job', 'Process', 'Invoice'],
    launch: function () {

        Ext.QuickTips.init();
        var cmp1 = Ext.create('App.view.Jobs', {
            renderTo: "form-job"
        });
        cmp1.show();
    }

});

, , (, combobox), initComponent, : "MyApp.store.Users" . , .

Ext.Loader.require() Ext.Application. , , .

jsb3 , , .

+3
source

All Articles