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: Flash, passing stage to ApplicationFacade  (Read 7529 times)
hesten
Sr. Member
****
Posts: 52


View Profile Email
« on: June 29, 2009, 12:50:57 »

In the various Flash examples I've seen using PureMVC the object sent to the application façade startup is the stage, why is this?

In some applications you don’t really need stage, and if you did, stage could always be reached through the document class instance.

So I just pass the document class instance to the application façade, is this considered bad practice, or will it have some side effects I've missed?

Regards
Logged
Torben
Newbie
*
Posts: 2


View Profile Email
« Reply #1 on: June 29, 2009, 01:05:18 »

I was just going to ask the exact same question.

I do the same as you - I don't see why I a need a mediator for the stage. A mediator for the application/document class makes more sense.
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #2 on: June 29, 2009, 05:18:17 »

This is perfectly fine. You can pass whatever you need to mediate. Most often it is the Stage. If there is something in the document class that needs mediation, then go for it.

Some Flex apps don't bother to mediate the application itself, but instead mediate its child components. An application (or document class) mediator is only necessary if you need to mediate at that level of the hierarchy, not categorically.
   
-=Cliff>
Logged
Torben
Newbie
*
Posts: 2


View Profile Email
« Reply #3 on: June 29, 2009, 05:46:36 »

Thanks Cliff
Logged
hesten
Sr. Member
****
Posts: 52


View Profile Email
« Reply #4 on: June 29, 2009, 06:19:36 »

Great thanks :)
Logged
Pages: [1]
Print