events - Sencha Touch fireEvent -
i have main panel comprised of sub panels , fire event in main panel , listen on sub panel.
i can fire event within subpanel , works can't seem fire event main panel.
my namespace sub panel "test.testcard" , i've tried fire event on no success.
here example of how this:
ext.setup({ onready: function() { var mainpanel = new ext.panel({ fullscreen: true, layout: 'fit', renderto: ext.getbody(), listeners: { 'mycustomevent': function() { alert('event fired!'); } }, items: [ { items: [ { html: 'my inner panel' }, { xtype: 'button', text: 'click me!', handler: function() { mainpanel.fireevent('mycustomevent', this); } } ] } ] }); } });
you can see creating reference mainpanel
, referencing later in code in button handler, call fireevent custom event. in mainpanel
, adding listener mycustomevent
.
and noted, best post on sencha forums, faster response.
Comments
Post a Comment