1. #1
    Sencha User
    Join Date
    Aug 2009
    Posts
    16
    Vote Rating
    0
    pabloflores is on a distinguished road

      0  

    Default Unanswered: itemtap not being triggered

    Unanswered: itemtap not being triggered


    itemtap is not being called.
    any idea what is wrong.
    onTap function is not being called.

    thanks. i 've tried many things.
    Code:
    
       Ext.define('pn.app.myList', {
            extend: 'Ext.List',
    
    
            config: {
                itemTpl: '{item}',
                onItemDisclosure: true,
                store: Ext.create('Ext.data.Store', {
                    model: 'saItems',
                    data: [
                        {item:'one'},
                        {item:'two'}
                    ]
                })
    
    
            },
    
    
            initialize: function() {
    
    
                this.callParent();
    
    
                this.on('itemtap', this.onTap, this);
            },
    
    
            onTap: function(dv,index, item, rec, e) {
                alert(123);
            }
        });
    
        Ext.define('pn.app.homePanel', {
            extend: 'Ext.Panel',
            config: {
                layout:'fit',
                items: [
                    Ext.create('pn.app.myList'),
                    {
                        xtype:'toolbar', 
                        docked: 'top',
                        items:[
                            {text: 'Home', handler: function() { alert(1);}}, 
                            {xtype: 'spacer'}, 
                            {text:'About', handler: function() {alert(2); }}
                       ] 
                    }
                ]
            }
        });
    
     pn.app.homePanel =  Ext.create('pn.app.homePanel');
            Ext.Viewport.add([
                pn.app.homePanel
            ]);

  2. #2
    Sencha User
    Join Date
    Aug 2009
    Posts
    16
    Vote Rating
    0
    pabloflores is on a distinguished road

      0  

    Default less info

    less info


    Code:
    just removed most of the codebut should this work?Ext.define('pn.app.myList', {        extend: 'Ext.List',        config: {            itemTpl: '{item}',            onItemDisclosure: true,            store: Ext.create('Ext.data.Store', {                model: 'saItems',                data: [                    {item:'one'},                    {item:'two'}                ]            })        },        initialize: function() {            this.callParent();            this.on('itemtap', this.onTap, this);        },        onTap: function(dv,index, item, rec, e) {            alert(123);        }    });

  3. #3
    Sencha User
    Join Date
    Aug 2009
    Posts
    16
    Vote Rating
    0
    pabloflores is on a distinguished road

      0  

    Default found it but

    found it but


    change from this
    Code:
      Ext.define('pn.app.homePanel', {
            extend: 'Ext.Panel',
            config: {
                layout:'fit',
                items: [
                    Ext.create('mylist'),
                    {
                        xtype:'toolbar', 
                        docked: 'top',
                        items:[
                            {text: 'Home', handler: function() { alert(1);}}, 
                            {xtype: 'spacer'}, 
                            {text:'About', handler: function() {pn.app.aboutPanel.show(); }}
                       ] 
                    }
                ]
            }
        });
    to this (using xtype instead of ext.create). any thoughts?
    Code:
      Ext.define('pn.app.homePanel', {
            extend: 'Ext.Panel',
            config: {
                layout:'fit',
                items: [
                    {xtype:'mylist'},
                    {
                        xtype:'toolbar', 
                        docked: 'top',
                        items:[
                            {text: 'Home', handler: function() { alert(1);}}, 
                            {xtype: 'spacer'}, 
                            {text:'About', handler: function() {pn.app.aboutPanel.show(); }}
                       ] 
                    }
                ]
            }
        });

  4. #4
    Sencha User tf.alves's Avatar
    Join Date
    Feb 2010
    Location
    Portugal
    Posts
    54
    Answers
    3
    Vote Rating
    0
    tf.alves is on a distinguished road

      0  

    Default


    have you tried the
    itemTap listener
    instead of
    onTap
    ?

  5. #5
    Sencha User
    Join Date
    Aug 2009
    Posts
    16
    Vote Rating
    0
    pabloflores is on a distinguished road

      0  

    Default continueing

    continueing


    hi,
    onTap is my local function that is attached via the 'on' method.
    So it seems that other folks have observed similar

    http://stackoverflow.com/questions/8...sencha-touch-2

    if i added the Ext.create it shows but tapping does not work, but it works if i add the xtype for lazy loading.
    am I missing something fundamental that changed with ST 2 that worked fine with ST 1.
    I used to do create of most panels before setup.onready, now, i converted most to ext.define. and try to create the panel only inside the onready. but 1) is this really necessary(makes me do classes for one of), 2) still not working a) events are not triggered..(in the example i have to use lazy loading now).. .

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