-
Installing the Sencha IO
Hi,
I'm trying to integrate the Sencha IO to my Sencha Touch 2 project.
I followed the new documentation (many thanks to merrells ;)) but i'm getting some errors:
Uncaught TypeError: Cannot read property 'Io' of undefined
I put this code in my app.js
Code:
//<debug>
Ext.Loader.setPath({
'Ext': 'sdk/src',
'Ext.io': 'lib/io/src/io',
'Ext.cf': 'lib/io/src/cf'
});
//</debug>
Ext.io.Io.setup({
//logLevel: 'debug',
appId: 'myID',
appSecret: 'mySecret
});
And in index.html i add this :
Code:
<script src="lib/io/sencha-io.js" type="text/javascript" charset="utf-8"></script>
-
I made some changes to my code :
I add this to Main.js
Code:
Ext.io.Io.setup({
logLevel: 'debug',
appId: 'myAppId',
appSecret: 'myAppSecret'
});
And now this is what i'm getting in console :
DEBUG: preInit started... Object
sencha-io.js:1INFO: SyncProxy.asyncInitialize: Opened database 'prospects'
- [COLOR=red !important]sencha-io.js:1Uncaught TypeError: Cannot call method 'update' of null
[/COLOR]
sencha-io.js:1DEBUG: authenticateDevice succeeded Object
sencha-io.js:1DEBUG: preInit done
sencha-io.js:1INFO: Transport type socket
- [COLOR=red !important]Uncaught RangeError: Maximum call stack size exceeded
[/COLOR]
-
It's trying to create a sync store before Ext.io.Io.init has been called.
This is a problem we know about, and are working on fixing.
If in your app you can delay creation of the store until after init has
been called then it should work OK.
John
-
Please can you give an example how to do that ? i tried many approches but no success.
-
We are going to release an update to the SDK in the next couple of days which will make this easier.
John
-
We shipped up update today (0.1.3) which included some improvements that fixed this problem.
http://download.sencha.io
John