PDA

View Full Version : starting an app: testing



dddesign
24 Jun 2010, 2:40 AM
hi everybody,
I'd like to start coding my own app. what is the best browser to testing an app (beside IPhone or Android itself)? on PC? on mac? or are there other tools for testing?
thanks for any tips.
jan

mrsunshine
24 Jun 2010, 2:52 AM
you can use Safari or Chrome and use the Developer Features of them to debug and test

dddesign
24 Jun 2010, 4:58 AM
thanks for your answer. right now I have safari4.1, do you know some limitation of this browser (=something doesn't work in this browser like geolocation)? probably I have to upgrade/change OS so I can use safari5 or chrome.

because for me there are some troubles in the examples. I have uploaded this to my server and made some small changes.

example1: I change the "position" of example "map". but the map don't get centered (problem: Ext.Map->center:position). is this a bug?
so I made some changes:

Ext.setup({
tabletStartupScreen: 'tablet_startup.png',
phoneStartupScreen: 'phone_startup.png',
icon: 'icon.png',
glossOnIcon: false,
onReady: function() {
var toolbar = new Ext.Toolbar({
dock: 'top',
xtype: 'toolbar',
title: 'Map'
});

//var position = new google.maps.LatLng(37.44885,-122.158592);
var position = new google.maps.LatLng(40.69847032728747,-73.9514422416687);

var mapdemo = new Ext.Map({
//center: position
});

new Ext.Panel({
fullscreen: true,
dockedItems: [toolbar],
items: [mapdemo]
});

var refresh2 = function() {
mapdemo.map.setCenter(position);
}

mapdemo.on('center', refresh2());
//refresh2();

// The following is accomplished with the Google Map API

var infowindow = new google.maps.InfoWindow({
content: 'Ext JS'
})

var marker = new google.maps.Marker({
position: position,
map: mapdemo.map
});

google.maps.event.addListener(marker, 'click', function() {
infowindow.open(mapdemo.map, marker);
});
}
});
is this done in a good way?
link: http://www.dddesign.ch/sencha/examples/map/

example2:

Ext.TabPanel->fullscreen:true is not working
in my example the alert statement don't execute...
Ext.setup({
tabletStartupScreen: 'tablet_startup.png',
phoneStartupScreen: 'phone_startup.png',
icon: 'icon.png',
glossOnIcon: false,
onReady: function() {
var timeline = new Ext.Component({
title: 'Timeline',
cls: 'timeline',
scroll: 'vertical',
tpl: [
'<tpl for=".">',
'<div class="tweet">',
'<div class="avatar"><img src="{profile_image_url}" /></div>',
'<div class="tweet-content">',
'<h2>{from_user}</h2>',
'<p>{text}</p>',
'</div>',
'</div>',
'</tpl>'
]
});

var position = new google.maps.LatLng(40.69847032728747,-73.9514422416687);
var map = new Ext.Map({
title: 'Map',
/*getLocation: true,
mapOptions: {
zoom: 12
}*/
});
var mapdemo = new Ext.Map({

});

var panel = new Ext.TabPanel({
fullscreen: true,
//animation: 'slide',
items: [mapdemo, timeline]
});


alert("panel loaded");

var refresh2 = function() {
alert(mapdemo);
alert(position);
mapdemo.map.setCenter(position);
}

mapdemo.on('center', refresh2());

}
});

link: http://www.dddesign.ch/sencha/examples/guide/

thanks a lot for your help
j

xantus
24 Jun 2010, 10:15 AM
http://www.dddesign.ch/sencha/examples/map/

I see that it is centering on a point in New York. It's working fine in Chrome 5 and Safari 5

dddesign
27 Jun 2010, 10:43 PM
and what about the second example (http://www.dddesign.ch/sencha/examples/guide/ )? do you get the alert "panel loaded"?

dddesign
28 Jun 2010, 1:37 PM
now I'm testing with chrome5 and I get in my 2nd example ( http://www.dddesign.ch/sencha/examples/guide/ ) following error:
Uncaught TypeError: Cannot read property 'data' of undefined (ext-touch-debug.js:15424)
if I remove "fullscreen: true," there's no error (but you can't see something...)
What is wrong?! please some help!
thx j