Reputation: 7497
I installed Sencha Touch 2 and wrote a simple hello world program. It displays Hello World on Chrome but without any mobile-like outfit. I checked and the style sheet file is accessible from the browser. What else could go wrong? Something is missing from the program?
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Hello World</title>
<script src="../touch/sencha-touch-all.js" type="text/javascript"></script>
<link href="../touch/resources/css/sencha-touch.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
Ext.application({
launch: function () {
Ext.create('Ext.Panel', {
fullscreen: true,
html: 'Hello World!'
});
}
});
</script>
</head>
<body></body>
</html>
Upvotes: 0
Views: 361
Reputation: 4673
You need to install Sencha CMD and than create your app with this command:
sencha -sdk /path/to/sencha-touch-sdk generate app MyApp /path/to/www/myapp
This command will bootstrap your application structure with all the files you need. At the moment you're not able to see any styles because there is no app.json file (which will be created automatically), which refers to your app.css.
After that you still need XAMP or MAMP to run your application. If you don't have any of them installed, you can also use:
sencha fs web -p 8000 start -map /path/to/your/project
You find all of those infos in the sencha documentation.
Upvotes: 2