I assumed we would be able to use the data components from GeoExt2 in Sencha 
Touch. So I attempted to use ProtocolProxy in Sencha Touch.

The issue I ran into was that this.protocol was undefined, so the proxy was 
created in the following way in the store:

config: {
         proxy: {
            type: 'gx_protocol',
            protocol: new OpenLayers.Protocol()
        }
}

I had to make a change to get this to work (basically I needed to use config):

diff --git a/src/GeoExt/data/proxy/Protocol.js 
b/src/GeoExt/data/proxy/Protocol.js
index afd5f62..5b49b9b 100644
--- a/src/GeoExt/data/proxy/Protocol.js
+++ b/src/GeoExt/data/proxy/Protocol.js
@@ -14,11 +14,13 @@ Ext.define('GeoExt.data.proxy.Protocol', {
     extend: 'Ext.data.proxy.Server',
     alias: 'proxy.gx_protocol',
 
-    /** 
-     * @cfg {OpenLayers.Protocol}
-     * The protocol used to fetch features.
-     */
-    protocol: null,
+    config: {
+        /** 
+         * @cfg {OpenLayers.Protocol}
+         * The protocol used to fetch features.
+         */
+        protocol: null
+    },
 
     /** 
      * @cfg {Boolean}
@@ -79,7 +81,7 @@ Ext.define('GeoExt.data.proxy.Protocol', {
             Ext.applyIf(options, options.params);
             delete options.params;
         }
-        this.response = this.protocol.read(options);
+        this.response = this.getProtocol().read(options);
     },
 
     /** 

Is this to be expected? And does this shed a new light on our use of config in 
GeoExt2?

Best regards,
Bart

-- 
Bart van den Eijnden
OpenGeo - http://opengeo.org
Expert service straight from the developers.



_______________________________________________
Dev mailing list
[email protected]
http://www.geoext.org/cgi-bin/mailman/listinfo/dev

Reply via email to