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

Show Posts

| * |

  Show Posts
Pages: [1]
1  Announcements and General Discussion / General Discussion / How to treat Flex StyleManager on: March 02, 2008, 03:53:28
Hi all,

I've been working on porting the Adobe AIR employee directory sample app to PureMVC as a learning exercise and I've come across a question that I'd like some input on.

The existing app has the following code in a LoadStyleSheetCommand:

var declEvent:IEventDispatcher = StyleManager.loadStyleDeclarations( fileName );
declEvent.addEventListener( StyleEvent.COMPLETE, onStyleLoad );
declEvent.addEventListener( StyleEvent.ERROR, onStyleLoadError );

If my understanding is correct, we shouldn't be using Flex events in a Command so here is my question:

do I treat the Flex StyleManager as a UI component and therefore create a StyleManagerMediator?

or is there a better way to handle this?

I'm inclined to come down on the side of the Mediator approach as this keeps all Flex event handling in the view.

Any suggestions?



2  Announcements and General Discussion / Getting Started / data binding on: September 20, 2007, 09:27:33

I'm wondering where (if?) flex data binding fits into the pureMVC model.

It seems to me that the intention is for Mediators/Proxies to handle the updating if models and view components when something changes or am I missing something?


Pages: [1]