Results 1 to 3 of 3

Thread: [PR2] Application behaves strangely when compiled into single file

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha User
    Join Date
    Jul 2009
    Vote Rating

    Default Answered: [PR2] Application behaves strangely when compiled into single file

    Dear All,

    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: and the patch that adds support for denormalized data described here: 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...


  2. Sounds like a build problem on our end with sencha-touch.js

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts