Results 1 to 9 of 9

Thread: [PR1] LocalStorage throwing error on 'sync()'

    Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-1019 in a recent build.
  1. #1
    Sencha User
    Join Date
    Sep 2011
    Posts
    118

    Default [PR1] LocalStorage throwing error on 'sync()'

    So, I'm trying to use LocalStorage and running into problems immediately when calling sync. Terminal is reporting "TypeError: Cannot call method 'create' of undefined". This happens on Google Chrome on Mac OS X.

    Here's my code, and an image of what's happening in my terminal.

    I believe this is a huge bug. Fix ETA?

    Error being thrown:

    Screen shot 2011-11-10 at 6.49.27 PM.png
    Here's the code on pastie

  2. #2
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661

    Default

    We are in the process of a large update to the Data package which should be part of the next release. Thank you for the report.

  3. #3
    Sencha User
    Join Date
    Sep 2011
    Posts
    118

    Default

    ETA on PR2? I started making an app with v2, and it's pretty much unusable in it's current state for any kind of production app.

  4. #4
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,379

    Default

    btw, PR2 is out. PR status is not meant to be deployed in a production environment.
    Mitchell Simoens @LikelyMitch

    Check out my GitHub:
    https://github.com/mitchellsimoens

    Posts are my own, not any current, past or future employer's.

  5. #5
    Sencha User
    Join Date
    Nov 2007
    Posts
    29

    Default

    Just switched to PR2 today and am now receiving the same error when trying to sync with localstorage, but did not receive the error using PR1.

    Chrome Error: Uncaught TypeError: Cannot call method 'create' of undefined

    Safari Error: TypeError: 'undefined' is not an object (evaluating 'me.proxy[operation.action]')

    Code:
    Ext.Loader.setConfig({ enabled: true });
    
    Ext.application({
        name: 'MyApp',
        controllers: [],
        models: [],
        launch: function() {
            
    
    
            Ext.define('Search', {
                fields: ['id', 'query'],
    	    extend: 'Ext.data.Model',
        	    proxy: {
            	type: 'localstorage',
            	id  : 'twitter-Searches'
        	    }
    	});
    	
    	var store = Ext.create('Ext.data.Store', {
        	    model: "Search"
    	});
    
    	store.load();
    
    	store.add({query: 'Sencha Touch'});
    
    	store.sync();
            
    
            
        }
    });

  6. #6
    Sencha User
    Join Date
    Nov 2011
    Posts
    10

    Default

    Same here.

  7. #7
    Sencha User
    Join Date
    Nov 2007
    Posts
    29

    Default

    @gregk - The workaround is in this thread -

    http://www.sencha.com/forum/showthre...tch.js-related

  8. #8
    Sencha User
    Join Date
    Nov 2011
    Posts
    10

    Default

    Thanks! I'll try it.
    Quote Originally Posted by joseph09 View Post
    @gregk - The workaround is in this thread -

    http://www.sencha.com/forum/showthre...tch.js-related

  9. #9
    Sencha User
    Join Date
    Mar 2007
    Location
    Haarlem, Netherlands
    Posts
    1,243

    Default

    This has been fixed and will be part of the next Touch 2.0 release. Thanks for the helpful report!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •