Results 1 to 2 of 2

Thread: Button handlers not destroyd on window close?

  1. #1
    Sencha User
    Join Date
    Jul 2007
    Location
    Italy
    Posts
    134
    Vote Rating
    0
      0  

    Default 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 User hendricd's Avatar
    Join Date
    Aug 2007
    Location
    Long Island, NY USA
    Posts
    5,966
    Vote Rating
    15
      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.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •