| 216 | | }, |
| 217 | | |
| 218 | | constructor: function(){ |
| 219 | | this._deferredConnects = dojo.clone(this._deferredConnects); |
| 220 | | for(var attr in this.attributeMap){ |
| 221 | | delete this._deferredConnects[attr]; // can't be in both attributeMap and _deferredConnects |
| 222 | | } |
| 223 | | // If a subclass has redefined a callback (ex: onClick) then assume it's being |
| 224 | | // attached to explicitly, via dojoAttachEvent="" (or attributeMap, but that was handled |
| 225 | | // above) and ignore the entry in _deferredConnects |
| 226 | | for(var attr in this._deferredConnects){ |
| 227 | | if(this[attr] !== dijit._connectOnUseEventHandler){ |
| 228 | | delete this._deferredConnects[attr]; |
| 229 | | } |
| 230 | | } |
| | 256 | // To avoid double-connects, remove entries from _deferredConnects |
| | 257 | // that have been setup manually by a subclass (ex, by dojoAttachEvent). |
| | 258 | // If a subclass has redefined a callback (ex: onClick) then assume it's being |
| | 259 | // connected to manually. |
| | 260 | this._deferredConnects = dojo.clone(this._deferredConnects); |
| | 261 | for(var attr in this.attributeMap){ |
| | 262 | delete this._deferredConnects[attr]; // can't be in both attributeMap and _deferredConnects |
| | 263 | } |
| | 264 | for(var attr in this._deferredConnects){ |
| | 265 | if(this[attr] !== dijit._connectOnUseEventHandler){ |
| | 266 | delete this._deferredConnects[attr]; // redefined, probably dojoAttachEvent exists |
| | 267 | } |
| | 268 | } |
| | 269 | |