PDA

View Full Version : How do I add Listeners in Sencha Architect?



Zachary1748
22 Aug 2012, 7:50 AM
Hello Everyone,

I am trying to figure out how to add a listeners such as this:


listeners:{
tap:function(){
window.open ("#");
}
}


On to a photo like this:


{
xtype : 'image',
docked: 'left',
src: 'images/capture.jpg',
height: 157,
ui: '',
width: 157,
html: ['<div id="header"><h2>Header</h2></div>'],
listeners:{
tap:function(){
window.open ("#");
}
}
}

But instead not directly through code I wanna do it through the Sencha Architect interface. Somebody please help me...

aconran
23 Aug 2012, 2:30 PM
Using an event binding
http://docs.sencha.com/architect/2/#!/guide/interactivity-section-2

If you have any additional questions please feel free to ask

Zachary1748
23 Aug 2012, 8:19 PM
Thank you, yeah I have one more question here is the link cause I created another thread... I am using Sencha Architect to build my app BTW.
http://www.sencha.com/forum/showthread.php?238537-Event-Bindings-Tap-function...

ahsanzubair
22 Dec 2012, 7:48 PM
i dont know how to do it in sencha architect. i dont see pinchstart (http://docs.sencha.com/touch/2-1/#!/api/Ext.dom.Element-event-pinchstart) in the list of events when binding events to my container. plz explain in steps if possible.

aconran
1 Jan 2013, 2:42 PM
Subscribe to the painted event and then attach an event handler to the Element of the container with code.