problem running sencha codes in eclipseEE - sencha-touch

How to run sencha touch codes in phonegap framework using ECLIPSE IDE?
We are facing problems as where to paste the codes and where to post the sencha libs..also we cant figure out how to run the code on the android emulator?do we need to run with a web server?
currently we have pasted the sencha code in assets folder(www subdirectory) and the sencha libraries in libs directory.But wen we run it in the emulator, it just displays the HTML part and not the sencha UI??!!!
plz reply soon.

Obviously you need to make sure that the HTML has included the correct links to the lib and app resources, in the head of the document.
See http://www.sencha.com/learn/Tutorial:Sencha_Touch_Hello_World for an example of how to set up the Sencha Touch directories and outer HTML.

Related

Minify all JavaScript Files in the Sencha App

I have a Sencha Application which contains Models, Controllers, Views etc. I need to minify all models, views, controllers, app Javascript file into a single JavaScript file. Any recommendation of tools on a Mac.
Sencha Cmd has an inbuilt function for this. Open up your command prompt, change into the root directory of your project and run:
sencha app build production
And it will generate a minified version of your app in YourApp/build/production/YourApp.
The answer is indeed sencha app build production
For a step by step here is an excellent blog post from Sencha
http://www.sencha.com/blog/getting-started-with-sencha-touch-2-build-a-weather-utility-app-part-1/
Its a three part blog post, you'll have fun following it, and in the third part it does make a build for production.
Here is a demo of how fast loads when is production build.
http://prosp-anonym111.rhcloud.com/simulador/build/production/reestructura/index.html
best regards

Sencha Cmd 4: minify the javascript code of ExtJS and Sencha Touch

I have developed two applications using ExtJS and Sencha Touch. I would like to minify the JavaScript code and create a single js file for all classes used in the applications (separately, I am trying to minify the code and not to build. My task doesn't depend on ExtJS or Sencha Touch).
I used sencha cmd verions 4 to do. It am facing some issues with both ExtJS and Sencha Touch application.
In ExtJS, It is not taking all the classes for minifying and creating a single js file. It is taking the classes which are mentioned in required method. If I want to minify the all the javascript classes, I will have to include all the classes in require method in app.js. This is not fair.
I used the following command. It is not giving any error
sencha -sdk <path-to-sdk> compile --classpath=<classpath> page -in index.html -out build/index.html -yui
In Sencha Touch, It is targetting for mobile environment (eg: Andriod, iPhone, windows, etc.). I am trying to compile and minify and not to package application.
Please let me know how to do.
This is working as intended. Sencha build process looks for dependencies (via require) and loads them accordingly, getting you the smallest build necessary. Good practice is to always set your requires.
To get around this, if you really want to just include all classes, you can add standalone requires to the top of the app. Since Ext.Loader can accept wildcards, you can just do Ext.require('App.model.*') and it will load all the individual model files, for example.

having some issues installing sencha touch 2 on mac book

I downloaded Sencha touch from this link Download for 2.1 GPL. Then I extracted to XAMPP/htdocs folder. Then I downloaded Senchatouch sdk tools from this link. I installed it in /Applications folder. Then in Terminal I cd to Applications/SenchaSDKTools-2.0.0-beta3. Here I run sencha command. But it displays following output in screenshot
I also checked PATH which shows following output
I searched all over internet to find its solution but none of them worked for me.
I also followed following links
link 1
link 2
Please help me how can I solve it?
UPDATE
After following #TDeBailleul I am getting the same error which is follow.
I first installed JRE then compass and then senchaCmd. I installed senchaCmd in /Applications/XAMPP/htdocs/sencha/ folder. Then I download Sencha Touch SDK form this link. Then I cd to Applications/XAMPP/htdocs/senchatouch/Sencha/Cmd/3.0.0.250/ and issued sencha command but got above output again.
You need to use Sencha Command and not Sencha SDK Tools with Sencha Touch 2.1
Take a look at my answer here :
Generate a sencha touch app
Hop this helps

how to make phonegap build of sencha app to run on blackberry device

I develop a sencha touch application. Its working fine.
Now i want to deploy/ run this application on blackberry simulator.
i found many question related to this but i did not get what to do exactly.
Please someone help me how to do this?
How to make phonegap build of sencha application to run on blackberry simulator.
Thank's in advance.
Follow phonegap's instructions for setting up a blackberry environment.
Build your project and move the entire contents of the built directory into the same folder that phonegap normally puts its index.html.
Follow phonegap's blackberry build instructions.

using sencha touch with rails 3.1

I created an example app on how to use Sencha Touch,Rails 3.1, Devise and Mongodb.
I put the Sencha Touch files in public folder, but i would like to know if there is a way to put it in the assets folder, doing it the rails way.
My issue is that everything gets compiled into one big javascript file, and i don't really want the code that is used for the non login part of the app always available.
you can see the source code for the app here: link
Thanks
move your javascript files to app/assets/javascripts/views/...view.js then they will be compiled for each individual view.