1. #11
    Sencha User
    Join Date
    Aug 2012
    Posts
    12
    Vote Rating
    0
    simonwittber is on a distinguished road

      0  

    Default


    After much tiral and error, I've found this command seems to do mostly what I want. The output is a new HTML file which references a script called 'all-classes.js' which contains all my JS code in one file.

    Code:
    sencha compile -classpath=app.js,app,sdk/src page -in=src.html -out=build.html
    However, when I load the new build.html, I get a error in the JS console.

    Code:
    Uncaught Error: [Ext.createByAlias] Cannot create an instance of unrecognized alias: widget.form
    I've looked through the all-classes file and the Ext.form.Panel is definitely present in the file (with the alias 'widget.form') so I'm now lost. What can I do next? Any help resolving this is appreciated.

  2. #12
    Sencha - Architect Dev Team Phil.Strong's Avatar
    Join Date
    Mar 2007
    Location
    Baltimore, MD
    Posts
    1,848
    Vote Rating
    57
    Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice

      0  

    Default


    My thought is that perhaps we need to have the microloader intact in your src.html file.

    Code:
    <!-- The line below must be kept intact for Sencha Command to build your application -->
        <script id="microloader" type="text/javascript" src="touch/microloader/development.js"></script>
    Then try rebuilding it with compile
    Phil Strong
    @philstrong
    #SenchaArchitect
    Sencha Architect Development Team

  3. #13
    Sencha User
    Join Date
    Aug 2012
    Posts
    12
    Vote Rating
    0
    simonwittber is on a distinguished road

      0  

    Default


    This is an ExtJS 4.1 project, not a touch project. Is there an equivalent 'microloader' for ExtJS?

  4. #14
    Sencha - Architect Dev Team Phil.Strong's Avatar
    Join Date
    Mar 2007
    Location
    Baltimore, MD
    Posts
    1,848
    Vote Rating
    57
    Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice

      0  

    Default


    So ExtJS index file does have some special stuff

    Code:
    <!DOCTYPE HTML>
    <html>
    <head>
        <meta charset="UTF-8">
        <title>fresh</title>
        <link rel="stylesheet" href=".res/default/app.css">
        <!-- <x-compile> -->
            <!-- <x-bootstrap> -->
                <script src="ext/ext-dev.js"></script>
                <script src="bootstrap.js"></script>
            <!-- </x-bootstrap> -->
            <script src="app.js"></script>
        <!-- </x-compile> -->
    </head>
    <body></body>
    </html>
    Phil Strong
    @philstrong
    #SenchaArchitect
    Sencha Architect Development Team

  5. #15
    Sencha User
    Join Date
    Aug 2012
    Posts
    12
    Vote Rating
    0
    simonwittber is on a distinguished road

      0  

    Default


    My bootstrap.js files only contains license information, no code, so I cannot see how this helps. The initial project created by Architect does not have the bootstrap.js file either.

    Has anyone successfully used Sencha Cmd to deploy and run an Architect project?

  6. #16
    Sencha User
    Join Date
    Aug 2012
    Posts
    12
    Vote Rating
    0
    simonwittber is on a distinguished road

      0  

    Default


    After investigating the all-classes.js file, it seems that some classes are being defined before their dependencies.

    Eg
    This line:
    Ext.define("FB.view.BidWindow", ....

    which uses a form panel (widget.form) in it's config data, is above the line:

    Ext.define("Ext.form.Panel", ....

    Any idea why this is happening?

  7. #17
    Sencha User
    Join Date
    Aug 2012
    Posts
    12
    Vote Rating
    0
    simonwittber is on a distinguished road

      0  

    Default


    I've been able to work around this using the requires list inside Architect. I didn't think this was supposed to be necessary?

    However, I'm now getting a "Uncaught TypeError: Cannot call method 'on' of undefined" which I've tracked down to a store not being registered in the Ext.data.StoreManager.

    I'm getting the impression that the sencha build tools are a bit immature when it comes to coping with larger projects, unless I'm doing something fundamentally wrong with my project.

  8. #18
    Sencha User
    Join Date
    Aug 2012
    Posts
    12
    Vote Rating
    0
    simonwittber is on a distinguished road

      0  

    Default


    It seems much of my problems are caused by checking the 'singleton' box for some of my views.

    I uncheck this, and these errors go away. I'll need to rewrite some of my functions to work with this configuration, but at least I'm making progress here...

  9. #19
    Sencha User
    Join Date
    Aug 2012
    Posts
    12
    Vote Rating
    0
    simonwittber is on a distinguished road

      0  

    Default


    Woohoo I solved all the dependency issues, pages and stores are now loading.

    However the built project only comes up with a blank screen. No errors or messages. Just blank. Of course, the source project does not do this.

    I'd be super happy if someone could get me past this to a working build!

  10. #20
    Sencha - Architect Dev Team Phil.Strong's Avatar
    Join Date
    Mar 2007
    Location
    Baltimore, MD
    Posts
    1,848
    Vote Rating
    57
    Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice

      0  

    Default


    Have you tried the built project in Chrome/Safari/FF?

    Is it white screen on device or browser?

    Any errors in Chrome?
    Phil Strong
    @philstrong
    #SenchaArchitect
    Sencha Architect Development Team