Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Pages: [1]
Print
Author Topic: Flex 4 Beta 2 & PureMVC - the result from server always executes twice...  (Read 8679 times)
claudiu.ursica
Newbie
*
Posts: 2


View Profile Email
« 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
Logged
Jason MacDonald
Sr. Member
****
Posts: 243


View Profile Email
« Reply #1 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
« Last Edit: November 04, 2009, 06:41:10 by Jason MacDonald » Logged
claudiu.ursica
Newbie
*
Posts: 2


View Profile Email
« Reply #2 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
Logged
Pages: [1]
Print