PDA

View Full Version : [INFOREQ] 2.0 problem, not sure if its browser or server



dcandler
3 Dec 2011, 12:25 PM
I have downloaded the 2.0 Developer and tried the Hello world example.

In google chrome I can see it has loaded the sencha touch .js file, but it doesnt change the body tag like it says in the video tutorial..

Server IIS 6 Win 2003 Web
Browser: Lastest Google chrome.

Code

<!DOCTYPE html>
<html>
<head>
<title>Getting Started</title>
<script type="text/javascript" src="lib/touch/sencha-touch.js"></script>
<link rel="stylesheet" href="lib/touch/resources/css/sencha-touch.css" type="text/css">
</head>
<body></body>
</html>

If I change the JS Link to the 1.1 hosted at CDN then it works fine,
Thanks in advance.

rdougan
3 Dec 2011, 3:16 PM
What code are you using? How are you viewing the source (to view the body tag)?

dcandler
3 Dec 2011, 11:59 PM
<!DOCTYPE html>
<html>
<head>
<title>Hello World</title>

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

<script type="text/javascript" src="app/app.js"></script>

<style>
.hello {
background:#ffffff;
background-image:url(http://src.sencha.io/320/http://chuvachienes.com/wp-content/uploads/2009/07/hello.jpg);
}
.world {
background:#ffffff;
background-image:url(http://src.sencha.io/320/http://www.unc.edu/world/College_Updates_2009/world-globe.jpg);
background-repeat:no-repeat;
}
</style>

</head><body></body>
</html>

links to .js and .css correct and i was using the element inspector in google chrome, I have tested in Safari to now and this page still doesnt work.

dcandler
4 Dec 2011, 12:08 AM
var helloWorld = new Ext.Application({
launch: function() {
this.tabs = new Ext.TabPanel({
fullscreen: true,
dockedItems: [{
xtype:'toolbar',
title:'Hello World'
}],
tabBar: {
ui: 'light',
layout: {
pack: 'center'
}
},
items: [{
cls:'hello',
title:'Hello'
}, {
cls:'world',
title:'World'
}]
});
}
});

rdougan
4 Dec 2011, 1:24 PM
Ext.Application has been renamed to Ext.application in ST2, and because this is a Preview release, there is no 100% backwards compatibility in place.

Simple application using ST2:


Ext.application({
launch: function() {
this.tabs = Ext.create('Ext.TabPanel', {
fullscreen: true,
tabBar: {
ui: 'light',
layout: {
pack: 'center'
}
},
items: [{
xtype:'toolbar',
title:'Hello World',
docked: 'top',
}, {
cls:'hello',
title:'Hello'
}, {
cls:'world',
title:'World'
}]
});
}
});

In the current PR, the 'tabBar' configuration will not work, because of a bug.

Also, please use [code] tags.