PureMVC Architects Lounge

Announcements and General Discussion => General Discussion => Topic started by: claudiu.ursica on November 04, 2009, 05:21:43



Title: Flex 4 Beta 2 & PureMVC - the result from server always executes twice...
Post by: claudiu.ursica on November 04, 2009, 05:21:43
Hi all,
I'm facing this issue after upgrading my Flash Builder to beta 2. Working with beta 2 seemed fine, so recently I updated to beta 2. However I noticed that every call that goes to server (i use HTTPService and implement IResponder in the proxy class) returns and calls the result function twice. This is really annoying especially when dealing with alerts and other things because notifications are triggered twice as a consequence... The easiest way to reproduce it is to try let's say the Cafe Townsend example form this site. Run under flex 3.x everything fine, moved under flex 4 beta2:

override public function handleNotification( note:INotification ):void
        {
            switch ( note.getName() )
         {
                case ApplicationFacade.LOAD_EMPLOYEES_SUCCESS:
      trace("success");
                    employeeList.employees_li.dataProvider = employeeProxy.employeeListDP;
                    break;

The trace is always displayed twice. I tried debugging to see what's happening but couldn't figure it out. Has anyone encountered this ? I assume it might have something with possible changes to fb4 beta 2, which is weird since it worked fine with the beta release...

Claudiu


Title: Re: Flex 4 Beta 2 & PureMVC - the result from server always executes twice...
Post by: Jason MacDonald on November 04, 2009, 06:39:11
This is a known Flex bug in 3.4. The nightly build of 3.5 fixes the issue. The early beta release used 3.3. The bug was introduced in 3.4.

Temp Fix: http://www.webappsolution.com/wordpress/2009/09/29/workaround-to-flex-sdk-34-bug-22333-httpservice-responders-are-called-twiceheres-a-fix/


Bug: http://bugs.adobe.com/jira/browse/SDK-22333


Title: Re: Flex 4 Beta 2 & PureMVC - the result from server always executes twice...
Post by: claudiu.ursica on November 04, 2009, 07:05:29
Bloody hell, it worked fine with the first Flex 4 beta. I dunno where they messed it up again ...

10x for the info, i have some refactorings to do ...

Cheers,
Claudiu