PDA

View Full Version : New in Sancha Touch



rickystanley76
18 Aug 2012, 9:26 AM
Hello Everybody
I am very new in Sencha touch 2(started yesterday). I need some help.
Let me tell you what i did:
In my Xampp we server in Mac i have htdocs/xampp/senchaTouch2 (open source version) also installed the SDK
Then i have done Getting started tutorial http://www.sencha.com/learn/getting-started-with-sencha-touch-2/ which is working fine with me web server.
Now i downloaded the code from Sencha learn github the Tabs and Toolbars code. and put it in a folder in folder /htdocs/xampp/tabsntools.
But when acess it from the browser, it shows blank screen.
My question is after putting the sample code from the sencha learn, do i have to do anything in the command line build/create or anything.
I will really appreciate your help in this regards.
Thanks in advance.
Ricky D'Cruze

pentool
19 Aug 2012, 12:12 AM
Chances are, the reason it shows a blank screen because the paths inside the <head> section in the index.html file are pointing to a location that is not found. Since your local setup (eg path/location/folder names) is probably different than the author's, the required files are not found, so it's coming up with a blank screen.

Try this (if you haven't solve this issue yet). In the index.html file, inside the <head> section, delete the following lines:



<script type="text/javascript" src="touch/sencha-touch-debug.js"></script>
<script type="text/javascript" charset="utf-8">
Ext.Loader.setConfig({
enabled: true,
paths: { 'Ext': 'touch/src' }
});
</script>


...and replace the deleted lines with this:



<script src="http://cdn.sencha.io/try/touch/2.0.1/sencha-touch-all.js" type="text/javascript"></script>
<link href="http://cdn.sencha.io/try/touch/2.0.1/resources/css/sencha-touch.css" rel="stylesheet" type="text/css" />


What it does, is basically point to the online location of the required css and js files which are hosted on Sencha's servers.

You can specify of course your own path/location (on your local server) for the required css and js files, but if you're just starting out, you can simply replace the paths to point to Sencha's servers and that takes care of running the sample.

rickystanley76
19 Aug 2012, 10:25 PM
Thanks Pentool, for your quick support.
What i did, i moved the SDK folder inside the application folder. and in the index.html i put


<script src="sdk/sencha-touch-all.js" type="text/javascript"></script>
<link href="sdk/resources/css/sencha-touch.css" rel="stylesheet" type="text/css" />


And it worked for me fine.
Thanks a lot.
Ricky