| 1 |
define([ |
| 2 |
"dojo/_base/array", |
| 3 |
"dojo/aspect", |
| 4 |
"dojo/_base/lang", |
| 5 |
"dijit/_WidgetBase", |
| 6 |
"./_DataBindingMixin" |
| 7 |
], function(array, aspect, lang, WidgetBase, DataBindingMixin){ |
| 8 |
|
| 9 |
|
| 10 |
lang.extend(WidgetBase, new DataBindingMixin()); |
| 11 |
|
| 12 |
|
| 13 |
aspect.before(WidgetBase.prototype, "startup", function(){ |
| 14 |
this._dbstartup(); |
| 15 |
}); |
| 16 |
|
| 17 |
|
| 18 |
aspect.before(WidgetBase.prototype, "destroy", function(){ |
| 19 |
if(this._modelWatchHandles){ |
| 20 |
array.forEach(this._modelWatchHandles, function(h){ h.unwatch(); }); |
| 21 |
} |
| 22 |
if(this._viewWatchHandles){ |
| 23 |
array.forEach(this._viewWatchHandles, function(h){ h.unwatch(); }); |
| 24 |
} |
| 25 |
}); |
| 26 |
}); |