Results 1 to 3 of 3

Thread: [2.1]Custom proxy not visible to sencha cmd

Hybrid View

Previous Post Previous Post   Next Post Next Post
    Looks like we cannot reproduce this. Please provide another test case to reproduce this issue.
  1. #1
    Ext JS Premium Member
    Join Date
    Apr 2007
    Posts
    228
    Vote Rating
    4
      0  

    Default [2.1]Custom proxy not visible to sencha cmd

    Platform:
    windows 7,Sencha Cmd v3.0.0.250, ipod(software v6.0.1)

    I've following custom proxy class:
    Code:
    Ext.define('app.tools.Test1', {
        extend: 'Ext.data.proxy.Rest',
        alias: 'proxy.test1',
        config: {
            reader: {
                type: 'json'
            },
            writer: {
                type: 'json',
                writeAllFields: false,
                nameProperty: 'mapping'
            },
            listeners: {
                exception: function (s, response) {
                    ...
                }
            }
        },
        ...
    });
    and store,which using it:
    Code:
    Ext.define('app.store.SomeStore', {
        extend: 'Ext.data.Store',
        requires: ['app.tools.Test1'],
        config: {
            model: 'app.test.SomeModel'
            ,proxy: {
                type: 'test1',
                url: 'some_url',
                reader: {
                    rootProperty:'results'
                }
            }
           , autoLoad: true
        }
    });
    when I test application in chrome browser-all work as expected, 'test1' proxy is found and properly handled.
    But,if I trying to do "sencha app build native" to create ios application,I get error:
    Code:
    [ERR]           [ [2002] : Sencha Compiler Error <> Could not resolve 'type' property from object literal ] :: ( C:\temp\test\app\store\SomeStore.js => 16 : 8 )
    that could be "sencha cmd" problem,but I'm not sure.

    Workaround,define:
    Code:
    constructor: function (config) {
        config.proxy = {
            type: 'test1',
            url: 'some_url',
            reader: {
                rootProperty:'results'
            }
        };
        this.callParent(arguments);
    }
    for SomeStore.

    Thanks.

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,553
    Vote Rating
    1272
      0  

    Default

    It's working for me, you shouldn't do a native build for using it in a browser.

    I have these two:

    Code:
    Ext.define('MyApp.store.SomeStore', {
        extend : 'Ext.data.Store',
    
        requires : ['MyApp.tools.Test1'],
    
        config : {
            fields : ['foo'],
            proxy  : {
                type : 'test1',
                url  : 'data/json.json'
            }
        }
    });
    
    Ext.define('MyApp.tools.Test1', {
        extend : 'Ext.data.proxy.Rest',
        alias  : 'proxy.test1',
        config : {
            reader    : {
                type : 'json'
            },
            writer    : {
                type           : 'json',
                writeAllFields : false,
                nameProperty   : 'mapping'
            },
            listeners : {
                exception : function (s, response) {
    
                }
            }
        }
    });
    and in app.js I have:

    Code:
    stores : ['SomeStore'],
    In dev it works, do a testing build it works, do a production build it works, do a package build it also works.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Ext JS Premium Member
    Join Date
    Apr 2007
    Posts
    228
    Vote Rating
    4
      0  

    Default

    The problem is, I need to use native build-application for ios. I use chrome only for testing purposes.
    And it seems not consistent with "build once,run anywhere" philosophy of touch framework. As I can understand, any webkit based browser must be properly supported-it's framework in the first place anyway,hence abstraction layer by nature.Build system must not interfere with core framework/browser functionality.
    It's very strange, different build targets produce different results for the same framework.
    So, I believe something is wrong,but not sure that.
    Is you test case working for native build?

    Thanks.

Posting Permissions

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