PDA

View Full Version : [FIXED] Architect 2 + Cmd 3 - bug when defining stores etc on the Controller not on the App



welshcathy
7 Nov 2012, 8:45 AM
Hiya,

Not sure if this is the right place to post - so feel free to move if you want to.

I have a simple app
- created by Architect for Ext 4.1.x
- then using Sencha Cmd v3.0.0.230 and Ext 4.1.2a I run
sencha generate app
to create app of same name into the Architect app folder.

Then I updated
- index.html to point at app.js generated by Architect
- Architect to point at ext library folder /ext/ as generated by Cmd
- Architect Application name to match the app name generated by Cmd

See attached zip for the resulting application.
goodVersion.zip (excludes /ext/ source folder)

This has a simple store / model defined - and works well when tested using
/app.html

Then after running
sencha app refresh

bootstrap.js is regenerated to pick up the custom model / store etc...
And the app can be tested using
/index.html

All fine so far.

But I like to include stores / models / views in the relevant Controllers so that
- the app is more tidy
- I can use the handy generated getter and setter methods in the Controller

Here's where I hit the problem.

Testing with app.html is all still fine.
But when I regenerate the bootstrap.js and test again via index.html - the relative paths are messed up.

Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost:8888/Demo/app/controller/Main.js/store/Learner.js?_dc=1352305419056


See attached zip where the store and model are now referenced in the Controller.
badVersion.zip (excludes /ext/ source folder)

This isn't something that would normally be a big issue - but I am working on an application that gets additional data included in index.html from the server when it's launched.
I can't simulate this data on app.html as Architect would keep trashing it.
So I use index.html instead.

Workaround for now is to keep all references out of the Controllers .. or to always preview a built version of the application.

Apart from that I've not hit any other issues with Architect and Cmd working together :).

Cheers,

Cathy

Phil.Strong
7 Nov 2012, 2:28 PM
moved to Cmd forum. My short answer is I'm not sure and that I'll be learning something when Cmd team responds!

devnullable
7 Nov 2012, 7:29 PM
This is fixed in latest Sencha Cmd V3.0 GA (3.0.0.250) http://www.sencha.com/forum/showthread.php?244464-4.1.1-Controller-s-modules-load-problem