#17363 closed defect (fixed)
_startAtWatchHandles is called twice
Reported by: | adros | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | 1.9.2 |
Component: | DojoX MVC | Version: | 1.9.1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Multiple calling of '_startAtWatchHandles' method on one widget instance causes that destroying of this widget does not remove all handlers.
And aspect defined in atBindingExtension causes that this method is called every time startup is called. Multiple calling of 'startup' may occur in situations like this:
var g = new Group(); g.placeAt("someNode"); //this MAY also call startup g.startup();
And usually it is OK, because it is handled by this construction in startup method:
if(this._started){ return; }
Widget dojox/mvc/Group does not have this construction in its startup method. So creating Group programmatically, placing it and starting may cause that it will not be destroyed correctly.
But this is not only issue of Group, so I would suggest to replace aspect in atBindingExtension for this:
// Monkey patch widget.startup to get data binds set up aspect.before(w, "startup", function(){ if(this._started){ return; } this._startAtWatchHandles(); });
Change History (4)
comment:1 Changed 7 years ago by
comment:2 Changed 7 years ago by
Owner: | set to Ed Chatelain <[email protected]…> |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:4 Changed 7 years ago by
Milestone: | tbd → 1.9.2 |
---|
Changes submitted in https://github.com/dojo/dojox/pull/23