1. #1
    Sencha User
    Join Date
    Jul 2007
    Location
    Italy
    Posts
    134
    Vote Rating
    0
    fermo111 is on a distinguished road

      0  

    Default Button handlers not destroyd on window close?

    Button handlers not destroyd on window close?


    There is something odd with this snippet of code. Every time the window is opened, the _handlers array increases its length. Is it a bug or by design?

    Code:
    <button onclick="openDlg()">Open</button>
    
    function openDlg(){
    	win = new Ext.Window({
    		title: 'New Window',
    		width: 200,
    		height: 200,
    		modal: true,
    		closeAction:'close',
    		buttons: [{text: "OK"}]
    	});
    	
    	win.on ('render', function () { 
    		win.body.update(String(win.buttons[0].onClick._handlers.length));
    	});
    	
    	win.show();
    }

  2. #2
    Sencha - Community Support Team hendricd's Avatar
    Join Date
    Aug 2007
    Location
    Long Island, NY USA
    Posts
    5,962
    Vote Rating
    10
    hendricd will become famous soon enough hendricd will become famous soon enough

      0  

    Thumbs up


    Happy Buttons
    "be dom-ready..."
    Doug Hendricks

    Maintaining ux: ManagedIFrame, MIF2 (FAQ, Wiki), ux.Media/Flash, AudioEvents, ux.Chart[Fusion,OFC,amChart], ext-basex.js/$JIT, Documentation Site.


    Got Sencha licensing questions? Find out more here.


Thread Participants: 1