PDA

View Full Version : [FIXED-145] remove event listener from panel failed



su27
15 Jul 2010, 9:49 PM
it is a draggable item. i set draggable false then try to remove dragstart and drag end event.
but these event hasn't been removed successfully. i traced code. the issue is here
ev = me.events[ename]
if (ev.isEvent) {
ev.removeListener(fn, scope);
}

i'm 1005 sure ev is not undefined and it is an event. but ev.isEvent = false.
so this event hasn't been removed.
my current workaround is comment out if(evisEvent).

evant
15 Jul 2010, 10:03 PM
Please post a short test case that demonstrates the issue, it's very difficult to diagnose from the information you've provided.

DirectX
20 Jul 2010, 4:50 AM
Approved:

Simple example: for carousel's item I write



carouselItem.addListener('activate', myHandler);
carouselItem.removeListener('activate', myHandler);


and handler works as without second line.

Commenting "if" worked problem around.

Jamie Avins
20 Jul 2010, 8:15 AM
You issue has been entered in Trac for review.

TommyMaintz
28 Jul 2010, 12:19 PM
This has been fixed and will be part of the next release (0.9.3) due beginning of next week.