Opened 15 years ago

Closed 15 years ago

#1404 closed defect (invalid)

problem with event.disconnect

Reported by: [email protected] Owned by: alex
Priority: high Milestone:
Component: Events Version: 0.2
Keywords: Cc:
Blocked By: Blocking:


First disonnect perfectly... Second doesn't work

	var fncToCallAfter = function(){alert('what the ??');};
	var oTmp = {};
	oTmp.fncToCall = function(){alert('called');};
	oTmp.fncToCallAfter = function(){alert('not called');};
	dojo.event.connect('after', oTmp, "fncToCall", oTmp, "fncToCallAfter");
	dojo.event.disconnect('after', oTmp, "fncToCall", oTmp, "fncToCallAfter");
	//doesn't work
	dojo.event.connect('after', oTmp, "fncToCall", fncToCallAfter);
	dojo.event.disconnect('after', oTmp, "fncToCall", fncToCallAfter);

Change History (1)

comment:1 Changed 15 years ago by jkuhnert

Resolution: invalid
Status: newclosed

Sorry if I'm butting in and breaking up a perfectly valid ticket, but I can see in the second disconnect example you haven't told it what to disconnect the function calls you are missing the oTmp parameter to the second function...The signatures have to look exactly the same to work...I think the second example probably just doesn't work at all?

Note: See TracTickets for help on using tickets.