-
8 Mar 2012 3:26 PM #1
Sencha command build ignores loader path definitions
Sencha command build ignores loader path definitions
U]REQUIRED INFORMATION[/U]
Ext version tested:
- Sencha Touch 2.0.0
Browser versions tested against:
- Safari 5.13
DOCTYPE tested against:
- ____
Description:
- Sencha Command does not resolve dependencies of modules with MVCS classes outside of the app folder while testing and production build proberly
Steps to reproduce the problem:
- create a new application with sencha command
- add a custom module Mod1 with a MVCS structure folder and a controller file on the same level as the app folder
- in app.js add the path to the module to the loader config
- add the controller 'Mod1.controller.Mod1' to the application controller config
- sencha app build testing
The result that was expected:
- working application in the build/testing/ folder
The result that occurs instead:
- Loading error in the browser of the custom Mod1 controller file Code:
Mod1.js
Test Case:
Code://<debug> Ext.Loader.setPath({ 'Ext' : 'sdk/src', 'Mod1' : 'Modules/Mod1' }); // </debug> Ext.application({ controllers : ['PhoDo.controller.Homescreen', 'Mod1.controller.Mod1'], name : 'PhoDo', requires : ['Ext.MessageBox', 'Ext.app.Controller'], views : ['Main'], icon : { 57 : 'resources/icons/Icon.png', 72 : 'resources/icons/Icon~ipad.png', 114 : 'resources/icons/Icon@2x.png', 144 : 'resources/icons/Icon~ipad@2x.png' }, phoneStartupScreen : 'resources/loading/Homescreen.jpg', tabletStartupScreen : 'resources/loading/Homescreen~ipad.jpg', launch : function() { // Destroy the #appLoadingIndicator element Ext.fly('appLoadingIndicator').destroy(); // Initialize the main view Ext.Viewport.add(Ext.create('PhoDo.view.Main')); }, onUpdated : function() { Ext.Msg.confirm( "Application Update", "This application has just successfully been updated to the latest version. Reload now?", function() { window.location.reload(); }); } });
File structure:
- • app
- controller
- model
- profile
- store
- view
- Mod1
- controller
- model
- profile
- store
- view
- ...
- index.html
- app.js
HELPFUL INFORMATION
Screenshot or Video:
- attached
See this URL for live test case: http://
Debugging already done:
- seems that the set loader path info is ignored while running the testing/ production build
Possible fix:
- not provided
Additional CSS used:
- only default ext-all.css
- custom css (include details)
Operating System:
- ________
- OSX Lion
trainings / workshops / consulting: Sencha Touch / Ext JS
Profile on SenchaDevs
www: http://www.nils-dehl.de
twitter: nilsdehl
meetup: Sencha Touch / Ext JS Meetup Frankfurt
videos: http://vimeo.com/album/1621422
conference photos: http://www.flickr.com/photos/nils-dehl/
-
8 Mar 2012 5:18 PM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,714
- Vote Rating
- 436
We will look into testing this to ensure this can be done.
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.
-
8 Mar 2012 9:56 PM #3Sencha - Sencha Touch Dev Team
- Join Date
- Jul 2009
- Location
- Palo Alto, California
- Posts
- 469
- Vote Rating
- 9
Remove both //<debug> and //</debug> lines and it should just work.
In fact the default Ext.Loader.setPath() statement shouldn't even be there when you generate the app, something I overlooked. This won't be an issue in the next release.Sencha Touch Lead Architect
-
9 Mar 2012 8:43 AM #4
Thanks, never thought the solution is such easy :-) after trying different things for hours
trainings / workshops / consulting: Sencha Touch / Ext JS
Profile on SenchaDevs
www: http://www.nils-dehl.de
twitter: nilsdehl
meetup: Sencha Touch / Ext JS Meetup Frankfurt
videos: http://vimeo.com/album/1621422
conference photos: http://www.flickr.com/photos/nils-dehl/
-
13 Apr 2012 9:20 AM #5
Is a new release available?
Is a new release available?
@Jacky, is a new release already available?
@mrsunshine, how did you manage to make it work (where did you remove the debug lines)?
Regards,
Sasa
-
13 Apr 2012 9:31 AM #6Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Redwood City, California
- Posts
- 3,653
- Vote Rating
- 14
The beta2 tools release is available here: http://www.sencha.com/forum/announcement.php?f=92&a=30
There will be a new release next week for 2.0.1 final as well.
-
14 Apr 2012 2:42 PM #7
Still not working
Still not working
Thanks Jamie.
I uninstalled SDK Tools 2.0.0, installed Beta 2, downloaded SDK 2.0.1. RC and upgraded my application to SDK 2.0.1 RC but the problem remains. No matter if I build for "testing" or "production", the dynamic loader will always try to download additional javascript files even though I already have them in my app.js.
Was this issue already fixed in SDK Tools 2.0.0. Beta 2 or will it be fixed in SDK Tools 2.0.1. final?
My website is still quite small and I used Console in Chrome to go through each single page and be sure that there are no errors or warnings anywhere. Is there anything else that I can try?
-
15 Apr 2012 8:37 AM #8
Reference to sencha-touch-all.js in app.json
Reference to sencha-touch-all.js in app.json
I managed to solve the issue by referencing sencha-touch-all.js instead of sencha-touch.js in app.json - I figured this out by looking at the kitchensink sample.
Thanks for your replies.
-
10 Jan 2013 6:54 PM #9
Similar 404 Not Found issue after building with cmd 3.0 and ST 2.1
Similar 404 Not Found issue after building with cmd 3.0 and ST 2.1
Production build still tries to load individual app files using injectScriptEement.
I can run index.html with microloader from the dev directory just fine.
I ran sencha app build production OR package, with no errors.
Build directory was updated as expected.
But when I try to run the production or package index.html in the browser, the app fails and I get these results in web inspector:
Creating Application Cache with manifest http://localhost:3000/build/production/cache.appcache
Application Cache Checking event
Application Cache Downloading event
Application Cache Progress event (0 of 1) http://localhost:3000/build/production/index.html
Application Cache Progress event (1 of 1)
Application Cache Cached event
...and so on, one GET 404 error for every source file in my app.
I know I could just copy those files into the build directory but of course that wouldn't make sense. I can see the app.js file produced by the build does contain the necessary ST 2.1 classes as well as my app classes.
So...Why is the bootstrapping logic added to app.js by the build process invoking the Ext.apply.injectScriptEement for all the files that are already concatenated in app.js?
What am I doing wrong?
Many thanks!
Success! Looks like we've fixed this one. According to our records the fix was applied for
TOUCH-2416
in
2.0.


Reply With Quote