1. #1
    Sencha User
    Join Date
    Nov 2012
    Posts
    5
    Vote Rating
    1
    naisone is on a distinguished road

      0  

    Default Problems with Container Event

    Problems with Container Event


    I want to add a tap event to a Container.

    The following solution works outside sencha architect:

    HTML Code:
    listeners: {
        tap: { 
           element: 'element',     
           delegate: '#test',      
           fn: function(e) {           
                alert('Element with id "test" was tapped!');        
    }    
    } }
    http://stackoverflow.com/questions/9...orking-in-view

    But I couldn't figure out how this works with Sencha Architect. If I open up the architect after adding the code it will erase my changes. Why?

    How to add this in Sencha Architect?

  2. #2
    Sencha Premium Member
    Join Date
    Nov 2007
    Location
    Moore, Oklahoma
    Posts
    472
    Vote Rating
    13
    Mthor will become famous soon enough

      0  

    Default


    set up a controller function for that panel and add the below

    Code:
    container.element.on('tap', function() {
    
    }, container);

Thread Participants: 1