1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    255
    Vote Rating
    2
    Answers
    6
    landed is on a distinguished road

      0  

    Question Unanswered: Console.js:35[DEPRECATE][view.Layout#show] Call show() on a component that doesn't ..

    Unanswered: Console.js:35[DEPRECATE][view.Layout#show] Call show() on a component that doesn't ..


    Code:
        launch: function() {
    
    		Ext.widget('mainLayout').show();
    I have tried Ext.Viewport.add('mainLayout'); before the line above but I get an error so I am after the correct usage please anyone...

    Console.js:35[DEPRECATE][view.Layout#show] Call show() on a component that doesn't currently belong to any container. Please add it to the the Viewport first, i.e: Ext.Viewport.add(component);

  2. #2
    Sencha User
    Join Date
    Jan 2012
    Posts
    49
    Vote Rating
    0
    Answers
    6
    j.k is on a distinguished road

      0  

    Default


    Try
    PHP Code:
    var mainView Ext.widget('mainLayout');
    Ext.Viewport.add(mainView); 

  3. #3
    Sencha User
    Join Date
    Feb 2012
    Posts
    255
    Vote Rating
    2
    Answers
    6
    landed is on a distinguished road

      0  

    Default


    If I create using items {} fashion will I still need to add and show() the view in the actual class ?
    Thanks - at least my main view is showing.

  4. #4
    Sencha User
    Join Date
    Jun 2012
    Posts
    1
    Vote Rating
    0
    pumpapa is on a distinguished road

      0  

    Default Gotcha

    Gotcha


    Aaah, Ext.Viewport.add expects an array of components. The following doesn't generate the warning:

    var mainView = Ext.widget('mainLayout');
    Ext.Viewport.add([mainView]);