Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: sencha cmd v3. compile mvc structure ?

  1. #1
    Sencha User
    Join Date
    Feb 2010
    Location
    Figueres (Spain)
    Posts
    368
    Vote Rating
    5
      0  

    Default 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 Juarez

  2. #2
    Sencha User
    Join Date
    Feb 2010
    Location
    Figueres (Spain)
    Posts
    368
    Vote Rating
    5
      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 Juarez

  3. #3
    Sencha - Ext JS Dev Team dongryphon's Avatar
    Join Date
    Jul 2009
    Location
    Kansas
    Posts
    1,694
    Vote Rating
    232
      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
    Director of Engineering - 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!"

  4. #4
    Sencha User
    Join Date
    Feb 2010
    Location
    Figueres (Spain)
    Posts
    368
    Vote Rating
    5
      0  

    Default

    I'm using Extjs v 4.1.1.a
    -------------------
    Manel Juarez

  5. #5
    Sencha Premium Member
    Join Date
    Jun 2012
    Posts
    64
    Vote Rating
    4
      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
    10
      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
    Location
    Figueres (Spain)
    Posts
    368
    Vote Rating
    5
      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 Juarez

  8. #8
    Sencha - Ext JS Dev Team dongryphon's Avatar
    Join Date
    Jul 2009
    Location
    Kansas
    Posts
    1,694
    Vote Rating
    232
      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
    Director of Engineering - 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!"

  9. #9
    Sencha User
    Join Date
    Jun 2010
    Location
    Buenos Aires, Argentina
    Posts
    213
    Vote Rating
    10
      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
    Location
    Kansas
    Posts
    1,694
    Vote Rating
    232
      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
    Director of Engineering - 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!"

Page 1 of 2 12 LastLast

Posting Permissions

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