1. #1
    Sencha User
    Join Date
    Jun 2011
    Location
    Warsaw, Poland
    Posts
    38
    Vote Rating
    1
    sasklacz is on a distinguished road

      0  

    Default Build error or empty all-classes.js after compile with v3.250 and 3rd party libs

    Build error or empty all-classes.js after compile with v3.250 and 3rd party libs


    I have a really basic app utilizing ExtScheduler lib. The path to sources is added to sencha.cfg:

    app.classpath=${app.dir}/lib/Sch, ${app.dir}/app

    and the build/refresh/compile commands work properly, but the all-classes.js file is empty because I had to use incorrect imports to have no errors in the console :

    HTML Code:
            <!-- <x-compile> -->
                <!-- <x-bootstrap> -->
                    <script src="ext/ext-all.js"></script>
                   <script src="app/app.js"></script>
                <!-- </x-bootstrap> -->
            <!-- </x-compile> -->
    Now if I'll try any other combination, like :

    HTML Code:
            <!-- <x-compile> -->
                    <script src="ext/ext-all.js"></script>
                    <script src="app/app.js"></script>             
            <!-- </x-compile> -->
    or

    HTML Code:
            <!-- <x-compile> -->
                <!-- <x-bootstrap> -->
                    <script src="ext/ext-all.js"></script>
                <!-- </x-bootstrap> -->
                <script src="app/app.js"></script>
            <!-- </x-compile> -->
    operation crashes with the following error :

    [ERR] failed to find meta class definition for name DEMO.controller.EmployeeList
    So what is finally the proper way of building app with 3rd party libs ? Is the symbols.js file needed or a different approach is needed ?
    Using ExtGantt / ExtScheduler from Bryntum ? I can help you integrate and implement it.

  2. #2
    Sencha - Ext JS Dev Team dongryphon's Avatar
    Join Date
    Jul 2009
    Location
    Kansas
    Posts
    1,424
    Vote Rating
    150
    dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold

      0  

    Default


    This form is correct:

    Code:
        <!-- <x-compile> -->
    
            <!-- <x-bootstrap> -->
                <script src="ext/ext-all.js"></script>
            <!-- </x-bootstrap> -->
    
            <script src="app/app.js"></script>
    
        <!-- </x-compile> -->
    The content of the x-compile section minus the content of the x-bootstrap section is what drives the compiler's dependency scan. Without app.js included as above, the compiler would have nothing to scan.

    It may be that the classpath does not contain the EmployeeList class.

    The default class path is just the "app" folder. If you have not changed the classpath in sencha.cfg, what do you have in the app folder?
    Don Griffin
    Engineering Manager - Frameworks (Ext JS / Sencha Touch)

    Check the docs. Learn how to (properly) report a framework issue and a Sencha Cmd issue

    "Use the source, Luke!"

  3. #3
    Sencha User
    Join Date
    Jun 2011
    Location
    Warsaw, Poland
    Posts
    38
    Vote Rating
    1
    sasklacz is on a distinguished road

      0  

    Default


    This is my folder structure :

    Zrzut ekranu 2012-12-4 o 19.37.38.png

    so this looks properly to me, but the error suggests some module finding problems.
    Using ExtGantt / ExtScheduler from Bryntum ? I can help you integrate and implement it.

  4. #4
    Sencha - Ext JS Dev Team dongryphon's Avatar
    Join Date
    Jul 2009
    Location
    Kansas
    Posts
    1,424
    Vote Rating
    150
    dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold

      0  

    Default


    What does the EmployeeList.js file look like?
    Don Griffin
    Engineering Manager - Frameworks (Ext JS / Sencha Touch)

    Check the docs. Learn how to (properly) report a framework issue and a Sencha Cmd issue

    "Use the source, Luke!"

  5. #5
    Sencha User
    Join Date
    Jun 2011
    Location
    Warsaw, Poland
    Posts
    38
    Vote Rating
    1
    sasklacz is on a distinguished road

      0  

    Default


    The whole force...I mean source :

    Code:
    Ext.define('DEMO.controller.EmployeeList', {
        extend    : 'Ext.app.Controller',
    
        models    : [
            'Employee'
        ],
    
        stores        : [
            'Employees'
        ],
    
        views        : [
            'EmployeeList'
        ],
        
        init        : function() {
        
            this.control({
                'EmployeeList button[action=AddEmployee]'    : {
                    click : this.onAddNewResource
                },
    
                'EmployeeList'    : {
                    RemoveResource : this.onRemoveResource
                }
            });
        },
            
        onAddNewResource : function() {
            var store = this.getEmployeesStore();
            store.insert(0, new store.model({
                Name : 'New guy',
                Salary : 0
            }));
        },
    
        onRemoveResource : function(grid, rowIndex) {
            grid.getStore().removeAt(rowIndex); 
        }
    });
    Using ExtGantt / ExtScheduler from Bryntum ? I can help you integrate and implement it.

  6. #6
    Sencha - Ext JS Dev Team dongryphon's Avatar
    Join Date
    Jul 2009
    Location
    Kansas
    Posts
    1,424
    Vote Rating
    150
    dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold

      0  

    Default


    I noticed a suspicious space in your classpath:

    Code:
    app.classpath=${app.dir}/lib/Sch, ${app.dir}/app
                                     ^
    Try removing that (if it is really present in your sencha.cfg)
    Don Griffin
    Engineering Manager - Frameworks (Ext JS / Sencha Touch)

    Check the docs. Learn how to (properly) report a framework issue and a Sencha Cmd issue

    "Use the source, Luke!"

  7. #7
    Sencha User
    Join Date
    Jun 2011
    Location
    Warsaw, Poland
    Posts
    38
    Vote Rating
    1
    sasklacz is on a distinguished road

      0  

    Default .

    .


    This indeed solved my problem, together with a modified Ext.Loader configuration :

    Code:
    //  Ext.Loader.setConfig({
    //     disableCaching : true,
    //     enabled:true,
    //      paths: { 
    //          DEMO:'app'
    //     }
    //});
    
    Ext.Loader.setConfig({
        enabled : true
    });
    Ext.Loader.setPath('Sch',  './lib/js/Sch/');
    Using ExtGantt / ExtScheduler from Bryntum ? I can help you integrate and implement it.

Thread Participants: 1

Tags for this Thread