1. #1
    Sencha User
    Join Date
    Oct 2011
    Posts
    14
    Answers
    1
    Vote Rating
    2
    Simon.liu is on a distinguished road

      0  

    Question Answered: Picker update: slot area covers toolbar after data update

    Answered: Picker update: slot area covers toolbar after data update


    I tried following codes to update the data of a picker component.
    Data/slot is successfully updated, however, the slot area goes up and covers toolbar area. I am not sure what's wrong with current codes:
    Code:
    <!DOCTYPE html><html>
    <head>
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/> 
        <meta name="apple-mobile-web-app-capable" content="yes"/> 
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
        <title>Test</title>
        <link rel="stylesheet" href="http://docs.sencha.com/touch/2-0/touch/resources/css/sencha-touch.css" type="text/css">
        <script type="text/javascript" src="http://docs.sencha.com/touch/2-0/touch/sencha-touch-all.js"></script> 
        <script type="text/javascript">
        Ext.setup({
            onReady : function() {
                var picker = Ext.create('Ext.Picker', {
                    id: 'pickCmp',
                    doneButton: false,
                    cancelButton: false,
                    layout: 'fit',
                    toolbar: {
                        ui: 'light',
                        title: 'My Picker!',
                        items: [{
                            xtype: 'button',
                            text: 'update',
                            handler: function() {
                                var p = Ext.getCmp('pickCmp');
                                var newSlots = [
                                    {
                                        title: 'Speed',
                                        data : [
                                            {text: '10 KB/s', value: 10},
                                            {text: '20 KB/s', value: 20},
                                            {text: '30 KB/s', value: 30},
                                            {text: '40 KB/s', value: 40}
                                        ]
                                    }
                                ];
                                p.updateSlots(newSlots, p.getSlots());
                            }
                  
                        }]
                    },
                    slots: [
                        {
                            title: 'Speed',
                            data : [
                                {text: '50 KB/s', value: 50},
                                {text: '100 KB/s', value: 100},
                                {text: '200 KB/s', value: 200},
                                {text: '300 KB/s', value: 300}
                            ]
                        }
                    ]
                });
                
                picker.show();
            }
        });
        </script>
    </head>
    <body>
    </body>
    </html>
    my ultimate goal is to dynamically update data. but for test, I just add a button "Update" to manually update...

    thanks for any replies and views!

  2. This is a bug which I have already fixed. The issue is, that, it is removing all items from the picker, including the toolbar.

    Also, you should not use updateSlots, but setSlots. updateSlots is a private method.

  3. #2
    Sencha - Sencha Touch Dev Team rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,158
    Answers
    93
    Vote Rating
    6
    rdougan will become famous soon enough

      0  

    Default


    This is a bug which I have already fixed. The issue is, that, it is removing all items from the picker, including the toolbar.

    Also, you should not use updateSlots, but setSlots. updateSlots is a private method.
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

  4. #3
    Sencha User
    Join Date
    Oct 2011
    Posts
    14
    Answers
    1
    Vote Rating
    2
    Simon.liu is on a distinguished road

      0  

    Default


    here, you mean you've fixed this bug, does this mean I need to wait for next release?

  5. #4
    Sencha - Sencha Touch Dev Team rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,158
    Answers
    93
    Vote Rating
    6
    rdougan will become famous soon enough

      0  

    Default


    You'll have to wait for the next release unfortunately.
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

Thread Participants: 1

Tags for this Thread

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