3 Oct 2012 5:05 AM #141
The Proxy works like a webproxy, so if you use a filter to retrieve your 1 record you will only have the one record in memory. That's the way we use the DB. We filter to the records we need and don't rely on the findxxx functions for the major lookups.
Just remember that you will need to do some finagling on the filters to clear them out since they stack on top of each other. So if you do a filterCode:
3 Oct 2012 6:37 AM #142
Which version of PhoneGap and SqLite do you have. Is it the latest one?
I tired the example and having the same issue with ridan with PhoneGap 2.1.0 and this latest SQLite Plugin https://github.com/chbrody/Cordova-SQLitePlugin.
3 Oct 2012 6:50 AM #143
It was 1.x phonegap not 2.x... wish I could be more specific but don't have the time to dig up the files right now, sorry!
8 Oct 2012 8:40 AM #144
Thank shepsii for you work.
I am building Phonegap2.1 + lastest Sqlite Proxy + lastest Sqlite Plugin for Android with Sencha 2.1 Beta 3 (RC1 now) and Sencha CMD 3 v190. However the models still be initiated and their proxies created BEFORE the onReady method of the Ext.Application call is executed when i build package/tesing -> it is still OK in development enviroment.
I have double checked and applied your lasted fix related to the issue, but it seem not OK on Sencha 2 Beta 3.
Can you please help us work around.
9 Oct 2012 6:40 AM #145
Thanks for reply shepsii and badgerb1
i have another question, on the application launch event i need to check data from database before any view
created, so what im trying to do is get the store and find the record im looking for (Ext.getStore('store').findRecord()), but its seems during launch event all stores still empty and they get data after launch event done. (i add 'autoload : true' to store but still not works)
so how i can get the data before any view created?
10 Oct 2012 5:00 PM #146
Hopefully, we can continue to use sqlite plugin in next sencha release.
Note: i also adapted sqlitestorage of shepsii with sqlite plugin for Android on Phonegap 2.1.
11 Oct 2012 2:03 AM #147
You need to realise that loading from a database is not an instant event - it takes time.
So if you just call store.load() or set autoLoad to true, you can't assume data will be there instantly.
If you want to be able to make that assumption, listen to the load event on the store, and when this event fires, then instantiate your UI.
anhnt3 - could you share your adapted file - perhaps by branching on github? I wish I could spend the time tracking this down myself, personally I used Sencha Touch 2.1 and thought it was still a complete mess and nowhere near production ready. Promising, but when the general release happens, which in my experience with Sencha will be equivalent quality to a release candidate, I'll treat that as a RC and go through it filing all the bugs I can find... excuse my cynicism that there will still be loads!
11 Oct 2012 2:13 AM #148
There is no tx.executeSql interface in Sqlite Phonegap Plugin, it only support transactionDB API.
So in your setTable function, esspecially createTable, checkDataExists and checkExistingSchema, I must modify to use transactionDB.
Since then when application startup in native Android, DB and table is created succesfully.
Other operation like read,create... I am trying but currently I cannot work around [model 's proxy init before app' onready] problem in package build (Sencha 2.1 and Sencha CMD 3 v/190)
11 Oct 2012 4:51 AM #149
24 Oct 2012 2:07 PM #150
I'm interedted in your sqlite proxy, but I have a few questions :
How to make the demo work ?
We have to test it with phonegap/cordova ?
Do you have a tutorial to do an application with the proxy ?
Thread Participants: 36
- Stju (3 Posts)
- ridan (3 Posts)
- fayway (2 Posts)
- JacobGu (2 Posts)
- ludm (1 Post)
- vadimv (10 Posts)
- fairport (1 Post)
- trkaky (2 Posts)
- stirucherai (2 Posts)
- eryx (7 Posts)
- badgerb1 (3 Posts)
- BoomerBrian (2 Posts)
- jastako (6 Posts)
- billtallitsch (1 Post)
- anhnt3 (3 Posts)
- gcw07 (14 Posts)
- zmagyar (9 Posts)
- eeldwin (2 Posts)
- martv (2 Posts)
- caretta (7 Posts)
- henry.wilson (12 Posts)
- henry888 (1 Post)
- Qumhieh (5 Posts)
- klaus777 (4 Posts)
- munder (4 Posts)
- bbjay (1 Post)
- joeshke (2 Posts)
- jatinderbimra (1 Post)
- bumpy (1 Post)
- reco123 (1 Post)
- tling (2 Posts)
- Gaspard22 (6 Posts)
- Manoj Solanki (5 Posts)
- NMP (1 Post)
- vn_service_desk (1 Post)
- juanlubarreda (1 Post)