- }, this, {single:true});\r
- sb.on('afterlayout', function(){\r
- // Grab the statusEl after the first layout.\r
- sb.statusEl.getEl().on('click', this.onStatusClick, this, {buffer:200});\r
- }, this, {single: true});
+ }, this, {single:true});
+ sb.on({
+ scope: this,
+ afterlayout:{
+ single: true,
+ fn: function(){
+ // Grab the statusEl after the first layout.
+ sb.statusEl.getEl().on('click', this.onStatusClick, this, {buffer:200});
+ }
+ },
+ beforedestroy:{
+ single: true,
+ fn: this.onDestroy
+ }
+ });