sencha touch hello world program does not work

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>

Answers


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.


Need Your Help

How do I recover a deleted item from Visual Studio 2010?

c# visual-studio-2010

I've just deleted a file from Visual Studio 2010. Could someone help me with step-by-step instructions, i.e. press file, then -something-, then recover?

How can I ensure fopen() won't block when not connected to the network?

winapi

My win32 C++ application frequently checks a file that normally resides on a network share [in our corporate network]. But if the computer isn't connected to a network, the application freezes for

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.