1. #1
    Sencha User
    Join Date
    Feb 2010
    Posts
    355
    Vote Rating
    4
    maneljn is on a distinguished road

      0  

    Default sencha cmd v3. compile mvc structure ?

    sencha cmd v3. compile mvc structure ?


    When i use sencha compile command is it compatible with MVC structure ?
    The is that i put the app folder in classpath , but no one controller, model, etc... is included in all-classes.js

    Code:
    sencha compile -classpath=.\app,..\..\libs\extjs_v4_1_1_a\src,..\..\libs\extjs_cesi -ignore Ext.ux.form.TinyMCETextArea.js -ignore portalpanel.js -ignore Ext.ux.calendar.CalendarPanel.js page -yui -in ./index_desarrollo.php -out ./index.php
    -------------------
    Manel Juàrez

  2. #2
    Sencha User
    Join Date
    Feb 2010
    Posts
    355
    Vote Rating
    4
    maneljn is on a distinguished road

      0  

    Default


    i think that compiler only adds mvc structure if you define it like this

    Code:
        Ext.application({
            name: 'esitareas',
            autoCreateViewport: false,
            enableQuickTips: true,
            appFolder: '.',
            
            controllers: [
                // Controladores eSItareas
                'main', 'mainStatusBar',
                'listas.mant',
                'tareas.mant', 'tareas.imprimir'
            ],
    .....
    if you define like this, the mvc javascript classes are not included

    Code:
    esitareasApp = Ext.create('Ext.app.Application', {
            name: 'esitareas',
            autoCreateViewport: false,
            enableQuickTips: true,
            appFolder: '.',
            
            controllers: [
                // Controladores eSItareas
                'main', 'mainStatusBar',
                'listas.mant',
                'tareas.mant', 'tareas.imprimir'
            ],
    .....
    Is this normal ?
    -------------------
    Manel Juàrez

  3. #3
    Sencha - Ext JS Dev Team dongryphon's Avatar
    Join Date
    Jul 2009
    Posts
    1,346
    Vote Rating
    134
    dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all

      0  

    Default


    You are correct - the proper way to start your MVC app is Ext.application and this is specially recognized by Cmd.

    What framework and version are you using?
    Don Griffin
    Ext JS Development Team Lead

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

    "Use the source, Luke!"

  4. #4
    Sencha User
    Join Date
    Feb 2010
    Posts
    355
    Vote Rating
    4
    maneljn is on a distinguished road

      0  

    Default


    I'm using Extjs v 4.1.1.a
    -------------------
    Manel Juàrez

  5. #5
    Sencha Premium Member
    Join Date
    Jun 2012
    Posts
    64
    Vote Rating
    4
    team.avesta is on a distinguished road

      0  

    Default


    Did anybody get any solution to this problem..?? Please Share it on forum...
    .
    Thanks

  6. #6
    Sencha User
    Join Date
    Jun 2010
    Location
    Buenos Aires, Argentina
    Posts
    213
    Vote Rating
    9
    ldonofrio will become famous soon enough

      0  

    Default


    I've the same problem, i've to require MyApp.controller.* to get my app files included.
    I'm on 4.1.1a
    Any help?

    Regards
    Leonardo

  7. #7
    Sencha User
    Join Date
    Feb 2010
    Posts
    355
    Vote Rating
    4
    maneljn is on a distinguished road

      0  

    Default


    i have had to use this creation method, and then all controllers, etc... was included in compilation

    Code:
        Ext.application({
            name: 'esitareas',
            autoCreateViewport: false,
            enableQuickTips: true,
            appFolder: '.',
            
            controllers: [
                // Controladores eSItareas
                'main', 'mainStatusBar',
                'listas.mant',
                'tareas.mant', 'tareas.imprimir'
            ],
    .....
    This other method does'nt work.
    Code:
    esitareasApp = Ext.create('Ext.app.Application', {
    ....
    -------------------
    Manel Juàrez

  8. #8
    Sencha - Ext JS Dev Team dongryphon's Avatar
    Join Date
    Jul 2009
    Posts
    1,346
    Vote Rating
    134
    dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all

      0  

    Default


    Cmd processed the dependencies of an MVC application either by deriving from Ext.app.Application (or Controller) or by calling Ext.application.

    In dev mode, this is now handled the same way in 4.1.3+ to avoid synchronous loading the dependencies and generating warnings on the console.
    Don Griffin
    Ext JS Development Team Lead

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

    "Use the source, Luke!"

  9. #9
    Sencha User
    Join Date
    Jun 2010
    Location
    Buenos Aires, Argentina
    Posts
    213
    Vote Rating
    9
    ldonofrio will become famous soon enough

      0  

    Default


    And what about 4.1.1a?

    Quote Originally Posted by dongryphon View Post
    Cmd processed the dependencies of an MVC application either by deriving from Ext.app.Application (or Controller) or by calling Ext.application.

    In dev mode, this is now handled the same way in 4.1.3+ to avoid synchronous loading the dependencies and generating warnings on the console.

  10. #10
    Sencha - Ext JS Dev Team dongryphon's Avatar
    Join Date
    Jul 2009
    Posts
    1,346
    Vote Rating
    134
    dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all

      0  

    Default


    The call to Ext.application is understood by Cmd and Ext JS 4.1.1a but other forms of creating Ext.app.Application instances are not understood by Cmd. In 4.1.1a, the Ext.application call uses the Ext.app.Application constructor to synchronously load dependencies that have not been otherwise loaded, but you can ignore those warnings for now as they will go away in 4.2.
    Don Griffin
    Ext JS Development Team Lead

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

    "Use the source, Luke!"