This might be a bug in FluxController ...

0 views
Skip to first unread message

Mrinal Wadhwa

unread,
Mar 19, 2009, 3:24:13 PM3/19/09
to openflux
Hi Everyone,
 
In FluxController the detachModelHandlers function seems to be adding event listeners, shouldn't it be calling removeEventListener instead or am I missing something ? 


       private function detachModelHandlers(dispatcher:IEventDispatcher):void {
            for each(var directive:EventHandlerDirective in directives.modelHandlers) {
                var f:Function = this.metadata::[directive.handler] as Function;
                dispatcher.addEventListener(directive.event, f, false, 0, true);
            }
        }


Thank you,
_
Mrinal
http://www.mrinalwadhwa.com


Ryan Campbell

unread,
Mar 20, 2009, 5:17:47 PM3/20/09
to open...@googlegroups.com
Yes definitely. Nice catch.

neera...@gmail.com

unread,
Mar 22, 2009, 12:07:05 AM3/22/09
to open...@googlegroups.com
you are right ,
but it's adding event listener  as a week reference , so flash garbage collector will take care .

Thanks
Neeraj
--
Thanks
Neeraj Kanthariya
http://neerajonsky.blogspot.com/
Symphony Services Bangalore

Reply all
Reply to author
Forward
0 new messages