-
7 Mar 2013 4:40 AM #1
How to add listeners property in Sencha Architect
How to add listeners property in Sencha Architect
Hi Team,
Can I know how can I add the following listeners property in Sencha Architect.
listeners: {
hide: {
fn: function(){ this.destroy(); }
}
}
Regards,
Rajesh
-
7 Mar 2013 11:39 AM #2
1. Select the component in the project inspector pane.
2. In properties pane locate "Event bindings", press the "+" button, select the desired event ("hide" in your case) and event will be added.
3. Select the new added event then click "Code" button in the canvas pane.
Regards.UI: Sencha Architect 2.x / ExtJS 4 MVC
Server side: EJB 3.1 / CDI / JPA 2 / JAX-RS / JasperReports
Application Server: Glassfish 3.1.x
Databases: Oracle 10g & 11g / DB2 9 & 10 / Firebird 2.5
If you like my answer please vote!
-
7 Mar 2013 2:11 PM #3
-
7 Mar 2013 7:35 PM #4
Hi ssamayoa,
I have one more doubt. The click/tap event is missing for the panel in Sencha Architect.What event I have to use for tap event for panel?
Regards,
Rajesh
-
8 Mar 2013 10:01 AM #5
UI: Sencha Architect 2.x / ExtJS 4 MVC
Server side: EJB 3.1 / CDI / JPA 2 / JAX-RS / JasperReports
Application Server: Glassfish 3.1.x
Databases: Oracle 10g & 11g / DB2 9 & 10 / Firebird 2.5
If you like my answer please vote!
-
9 Mar 2013 10:44 PM #6
You can subscribe to the element's (within the Panel) click or tap event.
Aaron Conran
@aconran
Sencha Architect Development Team
-
9 Mar 2013 11:40 PM #7
-
Yesterday 11:54 AM #8
Could you explain a little bit further what you mean be subscribe to the Panel's event?
I'm trying to add a listener for a swipe event in Sencha Architect inside of a component, but not sure how to get this to work at all.
I've added a Basic Event Binding on component, listening on the event 'initialize', and then tried to test this with a tap event with the code
I'm really trying to detect a left or right swipe and found code like:Code:component.on('tap',function(){ alert('tap'); });
but this doesn't work either. I'm sure i'm missing something very small.Code:component.on('swipe', function(e, node, options) { if(e.direction == "left") { alert("Hey! I swipe left"); } else { alert("Hey! I swipe right"); } }


Reply With Quote
