1. #1
    Sencha User
    Join Date
    Jul 2009
    Posts
    14
    Vote Rating
    0
    Answers
    2
    michal.smolinski is on a distinguished road

      0  

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

    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: 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...

    Cheers,
    Michal

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

  3. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,642
    Vote Rating
    899
    Answers
    3574
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Sounds like a build problem on our end with sencha-touch.js
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    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 in print!

    When posting code, please use BBCode's CODE tags.

  4. #3
    Sencha User
    Join Date
    Jul 2009
    Posts
    14
    Vote Rating
    0
    Answers
    2
    michal.smolinski is on a distinguished road

      0  

    Default


    Thanks for reply, I understand that I should wait for PR3 (or eventually GA?) to hopefully get it fixed...

    I also tried to build Touch 2 PR2 on my own using jsb3 file provided with PR2 but received a lot of errors about missing source files (files not included in the donloadable package):

    Code:
    [ERROR] File '/home/kwach/workspace/icard/stuff/mobile/sencha-touch-2-pr2/../platform/core/src/Ext.js' is either not existent or unreadble
    [ERROR] File '/home/kwach/workspace/icard/stuff/mobile/sencha-touch-2-pr2/../platform/core/src/version/Version.js' is either not existent or unreadble
    [ERROR] File '/home/kwach/workspace/icard/stuff/mobile/sencha-touch-2-pr2/../platform/core/src/lang/String.js' is either not existent or unreadble
    [ERROR] File '/home/kwach/workspace/icard/stuff/mobile/sencha-touch-2-pr2/../platform/core/src/lang/Array.js' is either not existent or unreadble
    [ERROR] File '/home/kwach/workspace/icard/stuff/mobile/sencha-touch-2-pr2/../platform/core/src/lang/Number.js' is either not existent or unreadble
    [ERROR] File '/home/kwach/workspace/icard/stuff/mobile/sencha-touch-2-pr2/../platform/core/src/lang/Object.js' is either not existent or unreadble
    [ERROR] File '/home/kwach/workspace/icard/stuff/mobile/sencha-touch-2-pr2/../platform/core/src/lang/Function.js' is either not existent or unreadble
    [ERROR] File '/home/kwach/workspace/icard/stuff/mobile/sencha-touch-2-pr2/../platform/core/src/misc/JSON.js' is either not existent or unreadble
    [ERROR] File '/home/kwach/workspace/icard/stuff/mobile/sencha-touch-2-pr2/../platform/core/src/class/Base.js' is either not existent or unreadble
    [ERROR] File '/home/kwach/workspace/icard/stuff/mobile/sencha-touch-2-pr2/../platform/core/src/class/Class.js' is either not existent or unreadble
    [ERROR] File '/home/kwach/workspace/icard/stuff/mobile/sencha-touch-2-pr2/../platform/core/src/class/ClassManager.js' is either not existent or unreadble
    [ERROR] File '/home/kwach/workspace/icard/stuff/mobile/sencha-touch-2-pr2/../platform/core/src/class/Loader.js' is either not existent or unreadble
    [ERROR] File '/home/kwach/workspace/icard/stuff/mobile/sencha-touch-2-pr2/../platform/core/src/dom/AbstractQuery.js' is either not existent or unreadble
    [ERROR] File '/home/kwach/workspace/icard/stuff/mobile/sencha-touch-2-pr2/../platform/core/src/dom/AbstractHelper.js' is either not existent or unreadble
    [ERROR] File '/home/kwach/workspace/icard/stuff/mobile/sencha-touch-2-pr2/../platform/core/src/dom/AbstractElement.js' is either not existent or unreadble
    [ERROR] File '/home/kwach/workspace/icard/stuff/mobile/sencha-touch-2-pr2/../platform/core/src/dom/AbstractElement.static.js' is either not existent or unreadble
    [ERROR] File '/home/kwach/workspace/icard/stuff/mobile/sencha-touch-2-pr2/../platform/core/src/dom/AbstractElement.alignment.js' is either not existent or unreadble
    [ERROR] File '/home/kwach/workspace/icard/stuff/mobile/sencha-touch-2-pr2/../platform/core/src/dom/AbstractElement.insertion.js' is either not existent or unreadble
    [ERROR] File '/home/kwach/workspace/icard/stuff/mobile/sencha-touch-2-pr2/../platform/core/src/dom/AbstractElement.position.js' is either not existent or unreadble
    [ERROR] File '/home/kwach/workspace/icard/stuff/mobile/sencha-touch-2-pr2/../platform/core/src/dom/AbstractElement.style.js' is either not existent or unreadble
    [ERROR] File '/home/kwach/workspace/icard/stuff/mobile/sencha-touch-2-pr2/../platform/core/src/dom/AbstractElement.traversal.js' is either not existent or unreadble
    [ERROR] File '/home/kwach/workspace/icard/stuff/mobile/sencha-touch-2-pr2/bootstrap/data-release.js' is either not existent or unreadble
    [ERROR] File '/home/kwach/workspace/icard/stuff/mobile/sencha-touch-2-pr2/sencha-touch-release.js' is either not existent or unreadble
    It seems that there are at least some small issues with the build After all, it's still very early release and I perfectly understand this...

    I temporarily fixed the problem by manually patching sencha-touch-all-debug.js with all neccessary stuff and then I minimized it. Not a solution I'm happy with, but at least I've got something working for now...

    Cheers,
    Michal

Thread Participants: 1