1. #1
    Sencha Premium Member
    Join Date
    Apr 2009
    Posts
    162
    Answers
    5
    Vote Rating
    7
    jhoweaa is on a distinguished road

      0  

    Default Answered: Confused about this behavior

    Answered: Confused about this behavior


    I'm just starting to look at Sencha Touch and I downloaded the code base and the SDK. I used the 'sencha generate app' command to build the default application and it worked fine. I then tried to make a simple change and got an odd result.

    In the default implementation of the sample app, the second 'tab' contains a video and is defined like this:

    Code:
    ...
    title: 'Get Started',
    iconCls: 'action',
                    
    items: [
         {
              docked: 'top',
              xtype: 'titlebar',
              title: 'Getting Started'
         },
         {
              xtype: 'video',
              url: '...',
              posterUrl: 'http://b.vimeocdn.com/ts/261/062/261062119_640.jpg'
        }
    ]
    ...
    It has a title bar docked at the top and the video panel appears underneath it. I tried a simple substitution for the video panel and instead added a list, like this:

    Code:
    ...
    title: 'Get Started',
    iconCls: 'action',
    items: [
       {
          docked: 'top',
          xtype: 'titlebar',
          title: 'Getting Started'
       },
       {
           xtype: 'list',
           itemTpl: '{title}',
           data: [
               { title: 'Item 1' },
               { title: 'Item 2' },
               { title: 'Item 3' },
               { title: 'Item 4' }
           ]
       }
    ]
    ...
    The only difference was using the list instead of the video xtype. When I ran the application and visited the second tab, I saw the title bar, but no list items. However, if I changed my code to do this:

    Code:
    ...
       title: 'Get Started',
       iconCls: 'action',
       xtype: 'list',
       itemTpl: '{title}',
       data: [
          { title: 'Item 1' },
          { title: 'Item 2' },
          { title: 'Item 3' },
          { title: 'Item 4' }
       ]
    ...
    the list appeared. Going back to my first modification, I inspected the page and found that the list items were actually rendered, but one of the outer containers had a height of 0 which was preventing the items from being displayed. Is there something else I should have done in my configuration to make things work properly or is there a bug in Sencha Touch?

    Thanks.

    Jim

  2. The parent of the titlebar and list/video you should give it layout : 'fit'. The list and video are needing to be told to have a size and fit layout will do just that.

  3. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,801
    Answers
    3467
    Vote Rating
    834
    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


    The parent of the titlebar and list/video you should give it layout : 'fit'. The list and video are needing to be told to have a size and fit layout will do just that.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    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.

  4. #3
    Sencha Premium Member
    Join Date
    Apr 2009
    Posts
    162
    Answers
    5
    Vote Rating
    7
    jhoweaa is on a distinguished road

      0  

    Default


    That works. I figured it was probably something simple

    Thanks!

Thread Participants: 1

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..." hd porno faketaxi