This duplicates another bug already reported in our system: TOUCH-1280
  1. #1
    Sencha User
    Join Date
    Dec 2011
    Posts
    5
    Vote Rating
    0
    gorje001 is on a distinguished road

      0  

    Default TypeError on store.sync()

    TypeError on store.sync()


    Hi,

    I'm getting an error calling store sync() after removing or adding a record. Here's my code:

    remove: function() {
    var form = Ext.getCmp('createeditgathr');
    var record = form.getRecord();
    var store = this.getGathrsStore();
    store.remove(record);
    store.sync();
    this.index({ type: 'slide', direction: 'left' });
    },


    The model instance is correct and remove() completes without error. I get the error below on the store.sync() call. Any ideas?

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,549
    Vote Rating
    873
    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


    Can I get a test case? Need some more code to be able to reproduce and look at what the problem is.
    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
    Dec 2011
    Posts
    5
    Vote Rating
    0
    gorje001 is on a distinguished road

      0  

    Default


    Here's the model:

    Ext.define('TestApp.model.Gathr', {
    extend: 'Ext.data.Model',
    fields: [
    {name: 'id', type: 'int'},
    {name: 'server_id', type: 'int'},
    {name: 'owner_server_id', type: 'int'},
    {name: 'name', type: 'string'},
    {name: 'description', type: 'string'},
    {name: 'category_id', type: 'int'},
    {name: 'private', type: 'boolean'},
    ],
    proxy: {
    type: 'localstorage',
    id: 'gathrproxy'
    }

    });


    Here's the store:

    Ext.define('TestApp.store.Gathrs', {
    extend : 'Ext.data.Store',
    requires: 'TestApp.model.Gathr',
    model : 'TestApp.model.Gathr',
    storeId : 'gathrStore',
    autoLoad: true,
    });

    The model instance returned from the form is valid and contains data. Let me know if you need anything else.
    Thanks.

  4. #4
    Sencha User
    Join Date
    Mar 2007
    Location
    Haarlem, Netherlands
    Posts
    1,243
    Vote Rating
    10
    TommyMaintz will become famous soon enough TommyMaintz will become famous soon enough

      0  

    Default


    This is a duplicate of TOUCH-1019 and will be fixed as part of that bug. This will likely be fixed in the next Touch 2.0 release.

Thread Participants: 2