PDA

View Full Version : Help with create app.jsb3 - can not find my classes



psmacarov
28 Feb 2012, 11:46 AM
Hi, please help check my code below

It is app.js


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


Ext.ns('App','App.action','App.forms');

Ext.Loader.require([
'Ext.data.*'
,'Ext.data.reader.Xml',
,'Ext.form.*'
,'Ext.chart.*',
,'Ext.layout.container.Fit',
,'Ext.grid.plugin.RowEditing',
,'Ext.toolbar.Paging'
,'Ext.core.DomHelper'
]
);

Ext.application({
name : 'SkyControl',
appFolder : 'app',
controllers : 'startController',
launch : function() {

if (Ext.get('page-loader')) {
Ext.get('page-loader').remove();
}


it is index html


<!DOCTYPE html>
<html>
<head>




<!-- favicon -->
<link rel="shortcut icon" href="favicon.ico" />

<!-- 1 - ExtJs Lib (www.sencha.com) styles -->
<link rel="stylesheet" type="text/css" href="assets/lib/extjs/resources/css/ext-all.css"/>
<link rel="stylesheet" type="text/css" href="assets/lib/extjs/examples/shared/example.css"/>

<!-- 2 - Custom styles -->
<link rel="stylesheet" type="text/css" href="assets/css/app.css"/>
<link rel="stylesheet" type="text/css" href="assets/ico/icons-mini.css"/>

<!-- 3 - Sencha scripts -->

<script type="text/javascript" src="assets/lib/extjs/ext-all-debug.js"></script>
<!-- <script type="text/javascript" src="assets/lib/extjs/locale/ext-lang-en.js"></script> -->
<script type="text/javascript" src="assets/lib/extjs/examples/shared/examples.js"></script>

<!-- 4 - Custom scripts -->
<script type="text/javascript" src="app/helpers/consts.js"></script>
<script type="text/javascript" src="app/helpers/utils.js"></script>
<script type="text/javascript" src="app/helpers/funcs.js"></script>
<script type="text/javascript" src="app/helpers/ajax.js"></script>
<script type="text/javascript" src="app/language/lang.js"></script>
<script type="text/javascript" src="app/helpers/actions.js"></script>
<script type="text/javascript" src="app/helpers/tasks.js"></script>

<script type="text/javascript" src="app.js"></script>

</head>

<body>
<span id="page-loader"><img width="16" height="16" src="assets/img/loading.gif" />
&nbsp;&nbsp;Initializing...
<br />
</span>
<div id="div-blank"></div>
<div id="preload-image"></div>
</body>

</html>


I am trying to create jsb
C:\Users\macar\server\sky>sencha create jsb -a index.html -p app.jsb3
and my jsb have not any classes


{
"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": []
}

What wrong please help i can not understand

mitchellsimoens
29 Feb 2012, 7:36 AM
There are pretty big errors in SDK Tools 2 for windows.

subv3rsion
6 Mar 2012, 11:17 AM
There are pretty big errors in SDK Tools 2 for windows.

@mitchellsimoens would you suggest instead install on OSX and attempt to build in that environment since it is more stable?

bsbal
20 Mar 2012, 4:08 AM
I've a similar problem using SDK Tools 1.2.3
No user classes in jsb3 file at all.
I've tried everything.

worthlutz
20 Mar 2012, 4:38 AM
I'm having the same problem with 1.2.3 on my linux server. Only one store and its model files are found from app.js. The controller and the other store and all the views are ignored.

I spent most of yesterday trying to get all the dependencies added after adding all the user files by hand to the jsb3 file.

I never did get all the dependencies listed or in the right order.

I think that the solution is to just use ext-all.js and give up on the Tools until they are fixed.

Worth

bsbal
20 Mar 2012, 5:54 AM
I've managed it to have all user classes included now. I've removed Ext.onReady(... Ext.application ....) and replaced it with just Ext.application(...)

Example:


Ext.Loader.setConfig({
enabled: true,
paths: {
'Ext': '/Ext-4.0.7/src',
'Iks': '/IksKontrolle'
}
});
Ext.require('Ext.direct.*', function () {
//Init Ext.Direct (API call)
Ext.direct.Manager.addProvider(MyExt.REMOTING_API);
MyExt.REMOTING_API.timeout = 20000;
});


Ext.require([
'Ext.form.*',
'Ext.grid.*',
'Ext.data.*',
'Ext.chart.*'
]);




//Start App
Ext.application({
name: 'Iks',
appFolder: 'IksKontrolle',
autoCreateViewport: true,


controllers: ['ManagerKontrolle', 'ManagerDashboard', 'UserKontrolle', 'Viewport', 'Hilfe', 'Themengebiet', 'Thema', 'CheckStammdaten', 'UserAdmin', 'GenData'],


launch: function () {
.....



But now I've some issues with Ext.direct.