Sencha Touch 2.1.0rc2 and PhoneGap 2.1.0 does not startup
I have the following problem while starting the app. It does not occur in ST 2.1.0rc1.<br>
<br>
<strong>2012-10-16 01:32:13.292 KICKBAK[64098:1dc03] Multi-tasking -> Device: YES, App: YES</strong><br>
<strong>2012-10-16 01:32:13.990 KICKBAK[64098:1dc03] [INFO] Ext.device.connection.PhoneGap</strong><br>
<strong>2012-10-16 01:32:13.990 KICKBAK[64098:1dc03] [INFO] Phone is Online</strong><br>
<strong>2012-10-16 01:32:14.004 KICKBAK[64098:1dc03] [INFO] appInit - start</strong><br>
<strong>2012-10-16 01:32:14.013 KICKBAK[64098:1dc03] [INFO] Error on Line#18</strong><br>
<strong>Error: Ext.Loader is not enabled, so dependencies cannot be resolved dynamically. Missing required class: Ext.event.publisher.Dom</strong><br>
<strong>2012-10-16 01:32:14.014 KICKBAK[64098:1dc03] [INFO] Cordova Facebook Connect plugin initialized successfully.</strong><br>
<strong>2012-10-16 01:32:14.984 KICKBAK[64098:1dc03] [INFO] Ext.device.connection.PhoneGap</strong><br>
<strong>2012-10-16 01:32:14.984 KICKBAK[64098:1dc03] [INFO] Phone is Online<br>
<br>
</strong>I'm using sencha-touch-all.js, but yet, it's asking for classes that exists within that file?!?!?<br>
<br>
My index.html is<br>
<br>
<font size="1"><html><br>
...<br>
</font><font size="1"> <!--</font><br>
<font size="1"> Phone Gap Libs</font><br>
<font size="1"> --></font><br>
<font size="1"> <script type="text/javascript" src="lib/cordova-2.1.0.ios.js"></script></font><br>
<font size="1"> <!-- Debug Javascript on mobile browser --></font><br>
<font size="1"> <script type="text/javascript" src="lib/sencha-touch-all.js"></script><br>
</font><font size="1"> <script type="text/javascript"></font><br>
var _appPath = "app", _extPath = 'lib/sencha-touch-2.1.0-rc2/src';<br>
<font size="1"> var _appId = "xxxxxx";</font><br>
<font size="1"> Ext.Loader.setConfig(</font><br>
<font size="1"> {</font><br>
<font size="1"> enabled : false,</font><br>
<font size="1"> paths :</font><br>
<font size="1"> {</font><br>
<font size="1"> Ext : _extPath,</font><br>
<font size="1"> Genesis : _appPath</font><br>
<font size="1"> }</font><br>
<font size="1"> });</font><br>
function onBodyLoad()<br>
<font size="1"> {</font><br>
<font size="1"> document.addEventListener("online", function()</font><br>
<font size="1"> {</font><br>
<font size="1"> if (Ext.device)</font><br>
<font size="1"> {</font><br>
<font size="1"> console.log(Ext.device.Connection.__proto__.$className)</font><br>
}<br>
<font size="1"> console.log("Phone is Online");</font><br>
<font size="1"> }, false);</font><br>
document.addEventListener("deviceready", onDeviceReady, false);<br>
<font size="1"> }</font><br>
<font size="1"> function onDeviceReady()</font><br>
<font size="1"> {</font><br>
<font size="1"> console.debug = console.debug || console.log;</font><br>
<font size="1"> console.warn = console.warn || console.debug;</font><br>
<font size="1"> console.log("appInit - start");</font><br>
Ext.application(...);<br>
<font size="1"> console.log("appInit - end");</font><br>
<font size="1"> }</font><br>
<font size="1"> </script></font><br>
</head><br>
<font size="1"> <body onload="onBodyLoad()"></font><br>
<script type="text/javascript"><br>
<font size="1"> window.onerror = function(msg, url, linenum)</font><br>
<font size="1"> {</font><br>
<font size="1"> console.log("Error on Line#" + linenum + "\n" + msg);</font><br>
<font size="1"> }</font><br>
<font size="1"> </script></font><br>
</body><br>
<font size="1"></html></font>
Sorry for the inconvenience
REQUIRED INFORMATIONExt version tested:Browser versions tested against:DOCTYPE tested against:Description:- I'm getting complains from the Ext.Loader that some Ext Core classes are missing eventhough I used sencha-touch-all.js from your pre-compile library.
- No problems were found when running on Desktop (Safari/Chrome)
Steps to reproduce the problem:- Load up ST2.1.0r2 and PhoneGap 2.1.0 on iOS5/6 device
The result that was expected:- Application should launch as expected, just like ST2.1.0r1
The result that occurs instead:- Ext.Loader complains about Ext.event.publisher.Dom class is missing, amongst others ...
- The only workaround is to include all source files under /src and enabled dynamic loading.
Test Case:
Code:
<!DOCTYPE html>
<html>
<head>
....
<script type="text/javascript" src="lib/cordova-2.1.0.ios.js"></script>
<script type="text/javascript" src="lib/sencha-touch-all.js"></script>
.....
<script type="text/javascript">
var _appPath = "app", _extPath = 'lib/sencha-touch-2.1.0-rc2/src';
Ext.Loader.setConfig(
{
enabled : false,
paths :
{
Ext : _extPath,
Genesis : _appPath
}
});
function onBodyLoad()
{
document.addEventListener("deviceready", onDeviceReady, false);
}
function onDeviceReady()
{
Ext.application(...);
}
</script>
<body onload="onBodyLoad()">
</body>
</html>
HELPFUL INFORMATIONScreenshot or Video:
2012-10-16 01:37:37.939 KICKBAK[64530:1dc03] Multi-tasking -> Device: YES, App: YES
2012-10-16 01:37:38.330 KICKBAK[64530:1dc03] [INFO] Ext.device.connection.PhoneGap
2012-10-16 01:37:38.330 KICKBAK[64530:1dc03] [INFO] Phone is Online
2012-10-16 01:37:38.344 KICKBAK[64530:1dc03] [INFO] appInit - start
2012-10-16 01:37:38.354 KICKBAK[64530:1dc03] [INFO] Error on Line#18
Error: Ext.Loader is not enabled, so dependencies cannot be resolved dynamically. Missing required class: Ext.event.publisher.Dom
2012-10-16 01:37:39.329 KICKBAK[64530:1dc03] [INFO] Ext.device.connection.PhoneGap
2012-10-16 01:37:39.329 KICKBAK[64530:1dc03] [INFO] Phone is Online
See this URL for live test case: http://Debugging already done:Possible fix:- Enabled Dynamic loading, but not very feasible in deployment environment.
Additional CSS used:- ext-all.css
- custom css (included customized theme for my app, but not relevant to the testcase)
Operating System: