-
13 Apr 2011 7:36 AM #11Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,617
- Vote Rating
- 435
remove is working for me on 1.1.0 and removes only that record in local storage.
You can do a search in the forum and you may see some overrides floating around I made to fix certain bugs in removing.Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
3 May 2011 5:01 PM #12
K I'm a little confused by this thread - but it is the first result in google and is EXACTLY the problem I am experiencing atm.
I have Sencha Touch 1.1.0 loaded in Chrome 10 (desktop - for some initial dev work) and as it was records were not getting removed from the Local Storage.
I am actually using this project that I have modified to run over normal web sockets.
I hadn't even touched the Ext.Store chunks of code, but now I'm having to add this 'id' field to the store structure - which does indeed magically fix the remove/sync abilities.
So is it "as designed" that an 'id' field must be present for the store to function properly or is there a problem in 1.1.0 that still needs to be fixed?
(Or is that demo project just designed bass-ackwards to begin with maybe?)
-
2 Feb 2012 7:59 AM #13
Hello!
It's been a year since the last response to this thread. I am having a different kind of problem with the localstorage. The removal of items from local storage works fine but after i remove the last item the local storage becomes unusable.
In chromes debugger i see the local storage populated with 1 key for the proxy lets say that the proxy's id is
'favoritesOffersProxy' after i add an item with id 57 i get 2 records. One that is the proxy and another that is the record. After i remove the record the proxy gets deleted also, so the local storage gets unusable and i have to refresh the page to initialize my proxy again... does anyone have any idea how to resolve this?
this is my store
and i delete a record like thisCode:app.stores.FavoritesOffersStore = new Ext.data.Store({ id:'favoritesOffersStore', model:app.models.OffersModel, autoLoad:true, proxy: { id:'favoritesOffersProxy', type: 'localstorage' }});
If you have any questions about what exactly i'm talking about, don't hesitate to contacte me!Code:app.stores.FavoritesOffersStore.remove(item); app.stores.FavoritesOffersStore.sync();
Thank you!
-
17 Jan 2013 8:21 AM #14
Similar Threads
-
Local Storage
By tomalex0 in forum Sencha Touch 1.x: DiscussionReplies: 2Last Post: 20 Dec 2010, 6:24 AM -
Saving List data to local storage
By Akhenaten in forum Sencha Touch 1.x: DiscussionReplies: 6Last Post: 19 Dec 2010, 5:36 PM -
[FIXED] Invalid id for records loaded from local storage
By Mis63 in forum Sencha Touch 1.x: BugsReplies: 1Last Post: 13 Dec 2010, 10:45 AM -
Store.sync() only seems to work from site > local storage, not local storage > site
By rdougan in forum Sencha Touch 1.x: BugsReplies: 2Last Post: 3 Jun 2010, 10:53 AM -
idea: local storage using Flash Shared objects
By PromaneX in forum Community DiscussionReplies: 0Last Post: 2 Jun 2008, 4:53 AM


Reply With Quote
