1. #1
    Sencha User
    Join Date
    Nov 2007
    Posts
    294
    Vote Rating
    0
    Sesshomurai is on a distinguished road

      0  

    Default [CLOSED] [3.0rc1] .getLayout() return 'card' not ContainerLayout

    [CLOSED] [3.0rc1] .getLayout() return 'card' not ContainerLayout


    Hi,
    I have a Panel with layout:'card'. When I call panel.getLayout() it returns only the string 'card' and not the ContainerLayout object. Is this a bug? I need to get the layout instance to setActiveItem, but not sure if there is another way.

    Thanks for any tips.

  2. #2
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,498
    Vote Rating
    46
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Before it's rendered, the layout will be whatever layout string you specify. Configs get assigned to the object.

  3. #3
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,168
    Vote Rating
    119
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Sesshomurai -

    What is occurring is that you are accessing the layout configuration before it is turned into a layout manager. Take a look at the Ext 2.0 Overview which also applies to Ext 3 and the component life cycle. Where are you accessing getLayout()? Try it later in the component life cycle and you will find that the layout is now an instance of a CardLayout Manager.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  4. #4
    Sencha User
    Join Date
    Nov 2007
    Posts
    294
    Vote Rating
    0
    Sesshomurai is on a distinguished road

      0  

    Default


    Hey guys,
    My call to panel.getLayout() was after the panel was instantiated. That's why I was expecting ContainerLayout to be returned by getLayout(). But the panel _may_ not have been rendered yet.

    But I will re-structure it properly. As a workaround, I just created an instance of CardLayout (hehe, I know the docs prefer not to) during creation, but it allowed my code to be better encapsulated in some places.

    Gratzie!

Thread Participants: 2

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..."