Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha User
    Join Date
    Sep 2012
    Location
    Pesaro Italy
    Posts
    3
    Vote Rating
    0
    ziozucca is on a distinguished road

      0  

    Default Unanswered: store.remove() and store.sync() with localhost proxy what I'm doing wrong?

    Unanswered: store.remove() and store.sync() with localhost proxy what I'm doing wrong?


    Hi to all,
    i have some problems with store.sync() after a store.remove() function
    here's my code:

    store:
    Code:
    Ext.define('MyApp.store.MyStore', {
        extend: 'Ext.data.Store',
        config: {
       model: 'MyApp.model.MyModel',
            autoLoad: true,
            sorters: 'name',
            proxy: {
                type: 'localstorage',
                id: 'mystore'
            }
        }
    });

    controllers:

    IT WORKS FINE
    Code:
        MyADD : function() {
                   //..................
            Ext.getStore("MyStore").add(myrecord);
            Ext.getStore("MyStore").sync();
            mystore.load();
                    //..................
    
        },
    HERE I GET SOME PROBLEMS:
    Code:
    MyRemove: function() {
        //..................
            Ext.getStore("MyStore").remove(myrecord);
            Ext.getStore("MyStore").sync();
            mystore.load();
        //..................
        },
    The problem is:
    if i add some records, reload all the app, and remove the records I have non problems,
    if i add a records ad them remove it (without reloading the app) this record seems deleted but reappears after another mystore.load() , the records added BEFORE a reload of the app are succesfully deleted, i have this problemo only with remove() and removeall() , no problems with record adding or modifiyng

    I already tried to change autoLoad or autoSync proprieties and load/sync manually without results

    what I'm doing wrong?

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,519
    Answers
    3447
    Vote Rating
    814
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Did you check localstorage if the entry is actually being removed?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    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 in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Sep 2012
    Location
    Pesaro Italy
    Posts
    3
    Vote Rating
    0
    ziozucca is on a distinguished road

      0  

    Default


    of course i check,
    the record get removed from the localstorage (google chrome) ad after a second load() it reappears in the view and in the storage (same id)

    I've noticed other unusual behaviors:

    * if I "modify" the record with and add() before removing it the cancellation is effective an the record don't reappears
    Code:
            Ext.getStore("MyStore").add(myrecord);
           Ext.getStore("MyStore").remove(myrecord);
            Ext.getStore("MyStore").sync();
            mystore.load();
    *if i remove ALL records from a store (one by one or removeAll()) and add new records (without reloading the app) I have some visualization problems the localstore contains the right record but in the view I see the previus records (the one originally loaded with the app), if i reload the ap i see all right records.
    If i don't remove all the records everithing works fine. I don't know if this second behavior is related to the first but I'ts causing me much more problems because every removeAll() mess up al the app.

  4. #4
    Sencha User
    Join Date
    Sep 2012
    Location
    Pesaro Italy
    Posts
    3
    Vote Rating
    0
    ziozucca is on a distinguished road

      0  

    Default


    any suggestions?

Thread Participants: 1