Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#17363 closed defect (fixed)

_startAtWatchHandles is called twice

Reported by: adros Owned by: Ed Chatelain <ed.chatelain@…>
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 6 years ago by adros

comment:2 Changed 6 years ago by Ed Chatelain <ed.chatelain@…>

Owner: set to Ed Chatelain <ed.chatelain@…>
Resolution: fixed
Status: newclosed

In f6cc3c968e34bd3b90c7b7579faaa3eedd8e381f/dojox:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:3 Changed 6 years ago by Ed Chatelain <ed.chatelain@…>

In f89ebcdcacf7a9f1b35b1a294abcabdb6766d561/dojox:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:4 Changed 6 years ago by Ed Chatelain

Milestone: tbd1.9.2
Note: See TracTickets for help on using tickets.