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: Race condition in Flex AppSkeleton example app  (Read 10915 times)
mattmuller
Newbie
*
Posts: 5


View Profile Email
« on: July 07, 2009, 02:06:59 »

Weird thing is happening with the AppSkeleton flex example for me.
I compile in flex builder. the application complete event for main screen fires before the listener is added from the mediator. If i leave that browser window open and recompile, it works just fine.

http://trac.puremvc.org/Demo_AS3_Flex_AppSkeleton

Anyone had this / ideas on why its happening?

thanks,

MaTT
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #1 on: July 07, 2009, 02:39:04 »

the application complete event for main screen fires before the listener is added from the mediator.

Do you mean creationComplete? That triggers startup. No mediator should be registered at that point.


-=Cliff>
Logged
mattmuller
Newbie
*
Posts: 5


View Profile Email
« Reply #2 on: July 07, 2009, 02:57:40 »

Hi Cliff,

this is firing in MainScreen (I added a listener in preinitialize in MainScreen)

creationComplete="dispatchEvent( new Event( CREATION_COMPLETE ) )">

before this event listener is added in MainScreenMediator

this.mainScreen.addEventListener( MainScreen.CREATION_COMPLETE, this.handleCreationComplete );

I'd be happy to zip up and send it to you. All I have done is put some traces in using demonsterdebugger.

cheers,

MaTT

Logged
mattmuller
Newbie
*
Posts: 5


View Profile Email
« Reply #3 on: July 08, 2009, 03:48:12 »

Hi Cliff, it looks like the demonster debugger is causing the issue.

If the trace methods is executed first in the handler method for creation complete, non of the creation complete events fire.

I am emailing the demonster team.

thanks,

MaTT
Logged
Pages: [1]
Print