PDA

View Full Version : GET model although application is built



gabrielle
2 Jul 2011, 11:48 AM
Hello,

I have an MVC app running fine.
I have a built made with the SDK 1.2.1. When running the built application, I can see that there is an HTTP request to get my models : GET /my/path/myAppName/model/Mymodel.js?_dc=1309635234663 HTTP/1.1.

Why is it so, since my model is already included in all-classes.js?!!

Note: this is not even the right request to get the model. So the request never gets answered (404 Not Found) and my app does not perform as expected...:(
When running the non-built version (with the loader), the request is
GET /my/path/app/model/Mymodel.js?_dc=1309637403313 HTTP/1.1

Thank you for your help

gabrielle
3 Jul 2011, 9:50 AM
OK, interesting pb here.

1- I have an HTTP GET because I use an explicit Ext.require() for my model.
2- the use of an explicit Ext.require() seems to be required as shown here (http://www.sencha.com/forum/showthread.php?134238-reader-in-proxy-is-undefined&p=605369&viewfull=1#post605369).

Conclusion:
- if I don't use an explicit require, my app does not work at all
- if I do, my app work, but the built version does not.

:s

I have solved the pb manually by editing the all-classes.js file (replace Ext.require by model.js content)

JanVenekamp
4 Jul 2011, 4:51 PM
Maybe syncRequire ?

gabrielle
24 Jul 2011, 4:53 AM
Thank you JanVenekamp.
Finally, I could solve my pb by following this hint (http://www.sencha.com/forum/showthread.php?132481-CLOSED-4.0.0-MVC-Uncaught-TypeError-Object-lt-Object-gt-has-no-method-read&p=598672&viewfull=1#post598672).