PDA

View Full Version : Sencha Touch 2.0 Build Issue in Windows



Trinad
31 Jan 2012, 8:00 AM
Hi,

I am trying to compare DOJO Mobile Framework & Sencha Touch 2.0 Framework.

I found some thing interesting which is MVC Framework in Sencha 2.0. I try to modify the existed examples(Sencha 2.0)
I ran the build command(sencha create jsb -a http://localhost/RecentSencha/examples/kitchensink/index-debug.html -p app.jsb3) found the below errors.

[ERROR] Ext is not defined, please verify that the library is loaded properly on
the application's page
undefined:0 ReferenceError: Can't find variable: Ext

Below is my index-debug.html


<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Kitchen Sink</title>

<link rel="stylesheet" href="../../resources/css/sencha-touch.css" type="text/css">
<link rel="stylesheet" href="resources/css/sink.css?2" type="text/css">
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript" src="../../sencha-touch.js"></script>
<script type="text/javascript" src="app.js"></script>
<script type="text/javascript" src="overrides.js"></script>
</head>
<body></body>
</html>


I have followed the below Sencha documentation.

http://docs.sencha.com/ext-js/4-0/#!/guide/getting_started (http://docs.sencha.com/ext-js/4-0/#%21/guide/getting_started)

Below is my project structure:

-Webroot
- Examples(folder)
- kitchensink(folder)
app(folder)
extjs(I am putting sencha-touch-2.0.0-pr4 files here)
resources(folder)
app.js
index-debug.html

I have installed Sencha sdk tools 1.2.3

I am not sure if Sencha 2.0 supports in windows with Sencha sdk tools 1.2.3

What I am trying to achieve here is trying to to modify the Sencha 2.0 examples with Sencha SDK tools 1.2.3 version in Windows system.

I don't see any documentation or example for Sencha touch with MVC framework, I am spending lot of time here with no results.

Can some one help me or suggest me or guide me to the right path.

Thanks,
Trinad.

mitchellsimoens
31 Jan 2012, 9:31 AM
It's saying sencha-touch.js is not found.

Trinad
31 Jan 2012, 10:33 AM
Hi Mitchell,

Thank you very much for your response.

I can able to resolve some issues except one issue below are the details as steps wise.

1. undefined:0 ReferenceError: Can't find variable: Ext

above issue got resolved when I use complete URL (sencha create jsb -a http:/
/localhost:8081/RecentSencha/examples/kitchensink/index-debug.html -p app.jsb3) it worked..



2. After that I have got the below error:

undefined:0 Error: Ext.Loader is not enabled, so dependencies cannot be resolved
dynamically. Missing required classes: Kitchensink.view.phone.Main, Kitchensink
.view.phone.TouchEvents, Kitchensink.view.tablet.Main, Kitchensink.view.tablet.T
ouchEvents, Kitchensink.controller.phone.Main, Kitchensink.controller.tablet.Mai

resolved the above error using Ext.Loader.setConfig({enabled:true}); placing this line top of app.js



3. After that I see the below js files are not loading in Chrome browser tools:

GET http://localhost:8081/RecentSencha/examples/kitchensink/dom/CompositeElementLite.js?_dc=1328034262986 404 (Not Found)
GET http://localhost:8081/RecentSencha/examples/kitchensink/event/Dispatcher.js?_dc=1328034262986 404 (Not Found)
GET http://localhost:8081/RecentSencha/examples/kitchensink/event/publisher/Dom.js?_dc=1328034262992 404 (Not Found)
GET http://localhost:8081/RecentSencha/examples/kitchensink/dataview/NestedList.js?_dc=1328034263101 404 (Not Found)
GET http://localhost:8081/RecentSencha/examples/kitchensink/TitleBar.js?_dc=1328034263106 404 (Not Found)
GET http://localhost:8081/RecentSencha/examples/kitchensink/Container.js?_dc=1328034263115 404 (Not Found)
GET http://localhost:8081/RecentSencha/examples/kitchensink/navigation/Bar.js?_dc=1328034263118 404 (Not Found)
GET http://localhost:8081/RecentSencha/examples/kitchensink/app/Controller.js?_dc=1328034263145 404 (Not Found)
GET http://localhost:8081/RecentSencha/examples/kitchensink/Component.js?_dc=1328034263150 404 (Not Found)

I have changed sencha-touch.js to sencha-touch-all-debug.js this file worked with out any js files loading

4. When I do a build(sencha create jsb -a http:/
/localhost:8081/RecentSencha/examples/kitchensink/index-debug.html -p app.jsb3).

http://localhost:8081/RecentSencha/sencha-touch-all-debug.js:3682 [Ext.ClassMana
ger] Overriding existing alias: 'widget.touchevents' of: 'Kitchensink.view.table
t.TouchEvents' with: 'Kitchensink.view.phone.TouchEvents'. Be sure it's intentio
nal.

this is the only error I am getting now.

Thanks,
Trinad.