Results 1 to 7 of 7

Thread: No direct function specified for this proxy

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha User
    Join Date
    May 2012
    Posts
    5
    Vote Rating
    0
      0  

    Default No direct function specified for this proxy

    Hello,

    I'm using Ext.Direct to read lat/longs into a google map using sencha touch and .net mvc. The app runs great on my local machine and when I move it to the test server..the below message pops.

    [Ext.data.proxy.Server#read] No direct function specified for this proxy

    Any help would be greatly appreciated. I read that it takes time for the function to register and I did put the proxy in a constructor, but in vain.

    Thanks


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

    Default

    What does your proxy look like? And does the direct function exist when the store is being loaded?
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it!

    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
    May 2012
    Posts
    5
    Vote Rating
    0
      0  

    Default

    Thanks for the reply. My proxy looks like the below :

    Code:
    Ext.define('MobileDirect.store.BridgeGeos', {
        extend: 'Ext.data.Store',
        config: {
            model: 'MobileDirect.model.BridgeGeo',
            proxy: {
                type: 'direct',
                directFn: Layer.getBridgeGeo,
                //autoLoad: true,
                //paramOrder: 'start|limit',
                reader: {
                    type: 'json',
                    rootProperty: 'data'
                }
            }
        }
    
    
    });
    Also, my app.js looks like this...

    Code:
    Ext.Loader.setConfig({
        enabled: true,
        paths: { 'MobileDirect': '/app' }
    });
    Ext.direct.Manager.addProvider(Ext.app.REMOTING_API);
    
    
    Ext.application({
        name: 'MobileDirect',
        requires: [
            'MobileDirect.model.Layer',
            'MobileDirect.store.Layers',
            'MobileDirect.model.BridgeGeo',
            'MobileDirect.store.BridgeGeos'
        ],
        models: ['Layer','BridgeGeo','BridgeDetail'],
        stores: ['Layers', 'BridgeGeos', 'BridgeDetails'],
        views: ['Main','layerList'],
        controllers: ['Main'],
       
        launch: function () {
            Ext.Viewport.add({
                xclass: 'MobileDirect.view.Main'
            });
        }
    });
    Thanks for your help.

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

    Default

    Code:
    Ext.direct.Manager.addProvider(Ext.app.REMOTING_API);
    Needs to be in the launch method of Ext.application as it needs to wait for that <script> to load.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it!

    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.

  5. #5
    Sencha User
    Join Date
    May 2012
    Posts
    5
    Vote Rating
    0
      0  

    Default

    Thanks for prompt reply Mitchell. I tried your suggestion, but I receive the following errors

    [COLOR=red !important]Uncaught ReferenceError: Layer is not defined :55500/app/store/Layers.js?_dc=1352739060187:10[/COLOR]
    [COLOR=red !important]Uncaught ReferenceError: Layer is not defined :55500/app/store/BridgeGeos.js?_dc=1352739060188:7[/COLOR]
    [COLOR=red !important]Uncaught ReferenceError: Layer is not defined :55500/app/store/BridgeDetails.js?_dc=1352739060188:8[/COLOR]
    [COLOR=red !important]Uncaught Error: The following classes are not declared even if their files have been loaded: 'MobileDirect.store.Layers', 'MobileDirect.store.BridgeGeos', 'MobileDirect.store.BridgeDetails'. Please check the source code of their corresponding files for possible typos: '/app/store/Layers.js', '/app/store/BridgeGeos.js', '/app/store/BridgeDetails.js [/COLOR]

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

    Default

    Is Ext.app.REMOTING_API valid at that point when the store loads?
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it!

    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.

Tags for this Thread

Posting Permissions

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