1. #1
    Ext JS Premium Member
    Join Date
    May 2009
    Posts
    95
    Vote Rating
    40
    extjs@peacetech.com has a spectacular aura about extjs@peacetech.com has a spectacular aura about extjs@peacetech.com has a spectacular aura about

      0  

    Default [4.2.0 RC 1] class loading behavior changed?

    [4.2.0 RC 1] class loading behavior changed?


    I am migrating 4.1 to 4.2 and class loading is not working for me. It used to be that requires:[] will be loaded by stripping application name space and adding Application.appFolder. Now application namespace is kept in URL and appFolder entirely ignored.

    Is it expected behavior?

    For example

    Code:
    Ext.application({
      name: 'eContracts',
      requires: [
        'eContracts.util.StringUtil',
        'eContracts.util.LangUtil',
        'eContracts.view.Viewport'
      ],
    
    
      appFolder: 'app',
    .....
    fails with error
    Code:
    "
    
    
    "NetworkError: 404 Not Found - https://localhost/ec-proto/eContracts/util/LangUtil.js?_dc=1359043121740"
    "NetworkError: 404 Not Found - https://localhost/ec-proto/eContracts/util/StringUtil.js?_dc=1359043121739"
    "NetworkError: 404 Not Found - https://localhost/ec-proto/eContracts/view/Viewport.js?_dc=1359043121741"
    
    
    My directory structure is: 
    
    /app/Application.js
    /app/util/LangUtil.js
    /app/view/...
    ....

  2. #2
    Ext JS Premium Member
    Join Date
    May 2009
    Posts
    95
    Vote Rating
    40
    extjs@peacetech.com has a spectacular aura about extjs@peacetech.com has a spectacular aura about extjs@peacetech.com has a spectacular aura about

      0  

    Default


    Sorry path is

    /Application.js (my app.js)
    /app/util/LangUtil.js
    /app/view/...

    I tried
    paths:{
    'eContracts':'./app'
    },

    did not help

  3. #3
    Ext JS Premium Member
    Join Date
    May 2009
    Posts
    95
    Vote Rating
    40
    extjs@peacetech.com has a spectacular aura about extjs@peacetech.com has a spectacular aura about extjs@peacetech.com has a spectacular aura about

      0  

    Default it only affects app

    it only affects app


    I resolved by removing all requires from Ext.application({}). I guess it is timing issue - it starts resolving dependencies before Ext.Application is fully configured and had chance to configure ClassManager

  4. #4
    Sencha Premium Member
    Join Date
    May 2010
    Location
    Guatemala, Central America
    Posts
    1,324
    Vote Rating
    201
    ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold

      0  

    Default


    RC1?
    Where can I grab it?
    UI: Sencha Architect 3.x / ExtJS 4 & 5
    Server side: JEE / EJB 3.x / CDI / JPA 2.x/ JAX-RS / JasperReports
    Application Server: Glassfish / WildFly
    Databases: Oracle / DB2 / MySQL / Firebird

    If you like my answer please vote!

  5. #5
    Ext JS Premium Member
    Join Date
    May 2009
    Posts
    95
    Vote Rating
    40
    extjs@peacetech.com has a spectacular aura about extjs@peacetech.com has a spectacular aura about extjs@peacetech.com has a spectacular aura about

      0  

    Default


    you must be have support subscription,, then you can grab it from nightly builds

  6. #6
    Sencha Premium Member
    Join Date
    May 2010
    Location
    Guatemala, Central America
    Posts
    1,324
    Vote Rating
    201
    ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold

      0  

    Default


    Quote Originally Posted by extjs@peacetech.com View Post
    you must be have support subscription,, then you can grab it from nightly builds
    UI: Sencha Architect 3.x / ExtJS 4 & 5
    Server side: JEE / EJB 3.x / CDI / JPA 2.x/ JAX-RS / JasperReports
    Application Server: Glassfish / WildFly
    Databases: Oracle / DB2 / MySQL / Firebird

    If you like my answer please vote!

  7. #7
    Sencha Premium Member
    Join Date
    Dec 2011
    Posts
    11
    Vote Rating
    0
    zmathew is on a distinguished road

      0  

    Default 4.2 RC1 ??

    4.2 RC1 ??


    The latest 4.2 nightly build version I see is ext-4.2.0-20130127-beta.zip. I do not see any RC1 for 4.2 yet. Is 4.2 RC1 out ?

  8. #8
    Ext JS Premium Member
    Join Date
    May 2009
    Posts
    95
    Vote Rating
    40
    extjs@peacetech.com has a spectacular aura about extjs@peacetech.com has a spectacular aura about extjs@peacetech.com has a spectacular aura about

      0  

    Default


    internally it is marked rc-1

  9. #9
    Ext JS Premium Member Ron Howard's Avatar
    Join Date
    May 2011
    Posts
    123
    Vote Rating
    3
    Ron Howard is on a distinguished road

      0  

    Default


    I also noticed a slight change coming from 4.0.7 app tests I had to get them working in 4.2 but it wasn't much on my end. Changes for 4.2.0 is commented.

    Here is a snippet of my 4.0.7 arch-app.js:

    PHP Code:
    Ext.Loader.setConfig({
        
    enabledtrue,
        
    paths: {
            
    'MyApp''.',
            
    'Ext.ux.form''./js-4.0.7/plugin',
            
    'Ext.ux''./js-4.0.7/plugin'
        
    }
    });

    Ext.application({
        
    name'MyApp.arch',
        
    appFolder'js-4.0.7/arch',
        
    requires: [
            
    'MyApp.arch.Init',
            
    'MyApp.arch.Ajax'
        
    ]
    }); 
    And here is the same under 4.2.0 Beta 2 (I haven't tried the nightly yet):

    PHP Code:
    Ext.Loader.setConfig({
        
    enabledtrue,
        
    paths: {
    //Added the /js-4.2.0 to the relative path from the current html page location.
    //My arch-app.js is in js-4.2.0 directory but the html page is located in the parent directory.
            
    'MyApp''./js-4.2.0'
            
    'Ext.ux.form''./js-4.2.0/plugin',
            
    'Ext.ux''./js-4.2.0/plugin'
        
    }
    });

    Ext.application({
        
    name'MyApp.arch',
    //Added the ./ in front of this path so it's relative path from current html page location.
        
    appFolder'./js-4.2.0/arch'
        
    requires: [
            
    'MyApp.arch.Init',
            
    'MyApp.arch.Ajax'
        
    ]
    }); 
    My directory structure is below:
    Code:
    / (webroot)
        index.html
        js-4.2.0/
            arch-app.js
            arch/
                Init.js
                Ajax.js
    Of course I only use dynamic loading on the local machine for developers. We are currently building the sencha cmd into our build process using ant. But this is all I changed to get it working for me. If yours is working with beta 2 let me know and I will update ours to the nightly build to see what the difference is.