Results 1 to 5 of 5

Thread: Profiled Views not showing up after building production/testing

    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
      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
    39,553
    Vote Rating
    1272
      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 @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Nov 2011
    Posts
    11
    Vote Rating
    0
      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
    39,553
    Vote Rating
    1272
      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 @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  5. #5
    Sencha User
    Join Date
    Nov 2011
    Posts
    11
    Vote Rating
    0
      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?

Tags for this Thread

Posting Permissions

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