Hybrid View
-
24 Sep 2012 2:37 AM #1
Sencha Cmd + Ext.Direct
Sencha Cmd + Ext.Direct
What is the best way to compile an application with Ext.direct? For now I have a script called api.js
that I include after ext-dev.js and before app.js. That script has all the actions and then does the Ext.direct.Manager call:
I also had to go through and change all directFn: lines to strings, not functions (in sencha architect).Code:Ext.ns('Ext'); Ext.php = { "url":"\/extdirect\/router", "type":"remoting", "enableBuffer":true, "actions":{ ....Ext.require('Ext.direct.*', function() { Ext.direct.Manager.addProvider(Ext.php);});
-
26 Sep 2012 7:09 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,118
- Vote Rating
- 453
Should really be within the launch method of Ext.application.Code:Ext.direct.Manager.addProvider(Ext.php);
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
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 almost in print!
When posting code, please use BBCode's CODE tags.
-
26 Sep 2012 10:19 PM #3
Hi,
I am reasonably sure I tried that and had issues. I think some of my stores were trying to load before? Or maybe it was before I changed all the directFn: Function lines to directFn: 'string'.
-
12 Feb 2013 7:06 PM #4
See if anything in my thread helps, they've marked it as "Fixed": http://www.sencha.com/forum/showthread.php?247318
-
6 Jun 2013 2:16 AM #5
I place Ext.direct.Manager.addProvider into the constructor method of my application and it works fine with dynamic class loading, as well.
Code:Ext.define('school.Application', { name: 'school', extend: 'Ext.app.Application', requires: ['Ext.direct.*'], autoCreateViewport: true, constructor: function(config) { config = config || {}; (function applyMultipleNamespacesOfRemoteApi (apiNamespace){ Ext.Object.each(apiNamespace, function(key, value, object) { if (key == 'REMOTING_API') { Ext.direct.Manager.addProvider(value); } else { applyMultipleNamespacesOfRemoteApi(value); // recursive call } }); })(Ext.remote); this.callParent([config]); }, views: [], controllers: [], models: [], stores: [] });
Thank you for reporting this bug. We will make it our priority to review this report.


Reply With Quote