You found a bug! We've classified it as TOUCH-4004 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha User
    Join Date
    Nov 2011
    Posts
    11
    Vote Rating
    0
    urbanism is on a distinguished road

      0  

    Default Profiled Views not showing up after building production/testing

    Hello Everyone,
    i've written a sencha 2.1.1 app with an extra profile for tablet&desktop and everything is working correctly while im developing. But after i'm building production and testing with SenchaCMD3.0.2 the "normal" views are showing up.
    If added an extra console.log in the profile-launch function and it appears in the console, so the profile must been loaded correctly, but neverthelesss the correct views not appear.
    Thanks in advance,
    Urbanism

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    38,534
    Vote Rating
    1115
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default

    Ext.app.Application should Ext.require the profile dependencies however doesn't look like it is. For now you can manually require the dependencies.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Nov 2011
    Posts
    11
    Vote Rating
    0
    urbanism is on a distinguished road

      0  

    Default

    You mean add 'Ext.app.Profile' to the requires in the app.js?

  4. #4
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    38,534
    Vote Rating
    1115
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default

    Quote Originally Posted by urbanism View Post
    You mean add 'Ext.app.Profile' to the requires in the app.js?
    No, the classes that the profiles are trying to require.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  5. #5
    Sencha User
    Join Date
    Nov 2011
    Posts
    11
    Vote Rating
    0
    urbanism is on a distinguished road

      0  

    Default

    Sorry but i don't get it work
    This is my app.js code
    Code:
    //<debug>
    Ext.Loader.setPath({
        'Ext' : 'touch/src',
        'TestApp' : 'app'
    });
    // </debug>
    
    Ext.application({
        models : [ "ConfigModel", "UserModel", "ChatModel", "TaskModel",
                "TourModel", "VehicleModel" ],
    
        stores : [ "ConfigStore", "UserStore", "ChatStore", "TaskStore",
                "TourStore", "VehicleStore" ],
    
        controllers : [ "LoginController", "ProfileController", "TourController",
                "TaskController", "MapController", "ChatController" ],
    
         profiles : [ "Tablet" ],
    
        name : 'TestApp',
    //requires of the profiled views
        requires : [ 'Ext.MessageBox',
         'Ext.dataview.List', 'Ext.field.Select', 'Ext.field.DatePicker',
         'Ext.field.Password', 'Ext.field.Checkbox', 'Ext.Map',
         'Ext.form.FieldSet', 'Ext.Img', 'Ext.SegmentedButton',
         'Ext.field.DatePicker'
        ],
    //also added profiled views here
        views : [ 'Main', 'Login', 'Tab', 'Chat', 'Home', 'Tour', 'Task', 'Map',
                'Profile',
         'tablet.Main', 'tablet.Login', 'tablet.Tab', 'tablet.Chat',
         'tablet.Home',
         'tablet.Tour', 'tablet.Task', 'tablet.Map', 'tablet.Profile'
        ],
    
        launch : function() {
            // Destroy the #appLoadingIndicator element
            Ext.fly('appLoadingIndicator').destroy();
    
            // Initialize the main view
            Ext.Viewport.add(Ext.create('TestApp.view.Main'));
        }
    });
    and this my Tablet.js
    Code:
    Ext.define('TestApp.profile.Tablet', {
        extend : 'Ext.app.Profile',
    
        config : {
            views : [ 'Main', 'Login', 'Tab', 'Chat', 'Home', 'Tour', 'Task',
                    'Map', 'Profile' ],
            models : [],
            stores : [],
            controllers : []
        },
    
        isActive : function(app) {
            return Ext.os.is.Tablet || Ext.os.is.Desktop;
        },
    
        launch : function() {
            console.log("profile.Tablet launch")
            Ext.Viewport.add(Ext.create('TestApp.view.tablet.Main'));
        }
    
    });
    Build executes with no erros.
    But the Profiled Views still not showing up.
    Can you post an example?

Thread Participants: 1

Tags for this Thread