erneso.laval
11 Jul 2010, 8:35 AM
I am building an App with sencha touch & phonegap. But when I tried to open a client side Database (great stuff in html5) my sencha user interface disappears. This just happens when I try it on the iphone (on Safari/Chrome the code works Ok at my computer).
This is a minimal code that replicates the problem:
<html>
<head>
<script type="text/javascript" charset="utf-8" src="phonegap.js"></script>
<script type="text/javascript" src="sencha/js/ext-touch-debug.js"> </script>
<script type="text/javascript" charset="utf-8">
Ext.setup({
onReady: function() {
panel = new Ext.Panel({
fullscreen: true,
html:'Test',
});
var db = openDatabase('testDB', '1,0', 'Test DB', 65536); // (1) Problem
}
});
</script>
</head>
<body> </body>
</html>
If I don't open the database (1) The html "Test" displays correctly. When I open it, it appears briefly and then disappears. If I delete the call to phonegap.js it works OK. From time to time the problem does not occur (Memory issues?).
So ... it seems that there is a conflict between sencha/phonegap/openDataBase
Any help or direction is greatly appreciated!!
==========
Update: the problem just takes place when I install the application as a native app (vía PhoneGap & Xcode) to an iphone/app (either simulator or actual device). It is does not happen when I access the app via Internet.
This is a minimal code that replicates the problem:
<html>
<head>
<script type="text/javascript" charset="utf-8" src="phonegap.js"></script>
<script type="text/javascript" src="sencha/js/ext-touch-debug.js"> </script>
<script type="text/javascript" charset="utf-8">
Ext.setup({
onReady: function() {
panel = new Ext.Panel({
fullscreen: true,
html:'Test',
});
var db = openDatabase('testDB', '1,0', 'Test DB', 65536); // (1) Problem
}
});
</script>
</head>
<body> </body>
</html>
If I don't open the database (1) The html "Test" displays correctly. When I open it, it appears briefly and then disappears. If I delete the call to phonegap.js it works OK. From time to time the problem does not occur (Memory issues?).
So ... it seems that there is a conflict between sencha/phonegap/openDataBase
Any help or direction is greatly appreciated!!
==========
Update: the problem just takes place when I install the application as a native app (vía PhoneGap & Xcode) to an iphone/app (either simulator or actual device). It is does not happen when I access the app via Internet.