Answered: [PR2] Application behaves strangely when compiled into single file
I'm looking for any creative ideas that will help me nail down a strange bug I've been hopelessly fighting with for a few days. The problem is very simple: application works perfectly OK when dynamic loading of js files is used (I call it "development mode") but behaves strangely when built into single file ("production mode"). In the development mode I use Ext.Loader along with Ext.require and friends, then I use Ext.Loader.history to get the list of files in the order they were included and finally I put all this data into jsb3 file and compile all the stuff into single file (required Sencha Touch files go first, then the application files). Resulting "production mode" application starts with no complaints and in general works OK - views are switching, back button is working OK and so on. However there are subtle things that all seem to have common cause (well, this is my intuition that tells me about that :
1. Ext.Msg.alert doesn't show up - I tried to figure out why and I discovered that for some reason, right from the application start, the field "hidden" in the Msg object is set to false - which effectively makes the show() function to think that the alert box is already displayed so there's nothing to do - as a result, in "production mode" application alert doesn't show up. (In development mode - everything works OK, of course). To make things even more interesting, I don't get any error or warning in the console...
2. "show" events don't get fired when I switch to some view using Ext.Viewport.setActiveItem(). Again, no errors or warnings in the console...
What is more interesting - when I replace my custom-built Touch with stock sencha-touch-all.js file, everything starts working OK again. Unfortunately the problem is that I cannot use default sencha build because I had to fix some bugs there (I applied a patch for issue with local storage described here: http://www.sencha.com/forum/showthre...light=Batch.js and the patch that adds support for denormalized data described here: http://www.sencha.com/forum/showthre...zed-Data-patch) It may be that these two patches break something but it seems to be unlikely (To make sure I'm going to test this now and will get back when I confirm this or not. Edit: I tried and it doesn't change anything...)
I can reproduce this strange behavior both in the browser alone (Chrome) as well as on the Android simulator (I use Phonegap 1.2 for native packaging) and on the real device. The application uses Sencha Touch 2 PR2 and utilizes Sencha's MVC.
I'm looking for something creative that will help me find the bug, I'm running out of ideas on what to do now...
Posted by mitchellsimoens
Sounds like a build problem on our end with sencha-touch.js