Looks like we cannot reproduce this. Please provide another test case to reproduce this issue.
  1. #1
    Sencha User
    Join Date
    Nov 2007
    Posts
    25
    Vote Rating
    0
    andreik65 is on a distinguished road

      0  

    Default selectfield & buttom does not respond to clicks

    selectfield & buttom does not respond to clicks


    I'm using Sencha Touch Beta. I was trying to create a sippett of code for another problem (that i'll send later) while suddenly both selectfield and button stopped working.

    Is it a bug or am I doing something wrong?



    Code:
    Ext.Loader.setConfig({
    	enabled: true
    });
    
    
    var dataPanel = Ext.create( 'Ext.Panel', {
        	id: 'dataPanel',
        	layout: 'fit',
        	items:[{
                title: 'Basic',
                xtype: 'formpanel',
                id   : 'dataForm',
                layout: {
                    type : 'vbox',
                    align: 'stretch'
                },
                items: [{
                        xtype: 'fieldset',
                        title: 'Personal data',
                        instructions: '* mandatory field',
                        defaults: {
                            labelWidth: '35%',
                            required      : true,
                            clearIcon     : true
                        },
                        items: [{
                                xtype: 'selectfield',
                                name : 'disasterField',
                                label: 'Disaster field',
                                options: [
                                    {text : 'Value1',value: 'value1'},
                                    {text : 'Value2',value: 'value2'},
                                    {text : 'Value3',value: 'value3'}
                                ]
                            } , {
                                xtype: 'textfield',
                                name: 'name',
                                label: 'Name',
                                autoCapitalize: true
                            }]
                        },{
                            xtype: 'panel',
                            items: [{
                                    text: 'Salva',
                                    xtype: 'button',
                                    width: 135,
                                    right: 0,
                                    height: 50,
                                    handler: function(){
                                      alert("hello");
                                    }
                            }]
                        }
                    ]
                }]
            });
    
    
    
    Ext.application({
        name: 'TEST',
        icon: 'resources/images/icon.png',
        tabletStartupScreen: 'resources/images/tablet_startup.png',
        phoneStartupScreen: 'resources/images/phone_startup.png',
        glossOnIcon: false,
        viewport:{},
    
    
        launch: function() {
        	Ext.Viewport.add(dataPanel);
        }
    });

    Thanks
    Andrea

  2. #2
    Sencha - Sencha Touch Dev Team Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    21
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    First glance it seems ok, we'll have to take a closer look.

    Sencha Inc

    Jamie Avins

    @jamieavins

  3. #3
    Sencha - Sencha Touch Dev Team Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    21
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    It seems to be fine when I try it. The fieldset 's layout seems unnecessary, but other than that I don't see any issues.

    Sencha Inc

    Jamie Avins

    @jamieavins

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

      0  

    Default selectfield & buttom does not respond to clicks

    selectfield & buttom does not respond to clicks


    i've tried it on an IPad, a Samsung Galaxy SII and Chrome 17 on Window and it fails everywhere. I am using the sencha-touch-all.js file taken from builds directory. Here is my index.html



    <!DOCTYPE html>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Test</title>
    <link rel="stylesheet" href="lib/resources/css/sencha-touch.css" type="text/css" />
    <script type="text/javascript" src="lib/sencha-touch-all.js"></script>
    <script type="text/javascript" src="js/test.js"></script>
    </head>
    <body></body>
    </html>

    Thanks,
    Andrea

  5. #5
    Sencha User
    Join Date
    Nov 2007
    Posts
    25
    Vote Rating
    0
    andreik65 is on a distinguished road

      0  

    Default


    Same behaviour with Beta 2

  6. #6
    Sencha - Sencha Touch Dev Team Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    21
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    Sorry, I think I see the problem. I inadvertently fixed it in my test case without realizing it. If you are going to use Ext.application to launch you cannot create the components beforehand, only define them. Otherwise what you describe happens. If you are using the Ext.application MVC structure, you really need to go the whole way with controllers, etc. The following works fine though, as it is what I made to test locally:

    Code:
            Ext.setup({
                onReady:function () {
                    var dataPanel = Ext.create('Ext.Panel', {
    .
    .
    .
                    });
                    Ext.Viewport.add(dataPanel);
                }
            });

    Sencha Inc

    Jamie Avins

    @jamieavins

  7. #7
    Sencha User
    Join Date
    Nov 2007
    Posts
    25
    Vote Rating
    0
    andreik65 is on a distinguished road

      0  

    Default


    Thank you.

    Regards.

Thread Participants: 1