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] 2
1  Announcements and General Discussion / Getting Started / Re: AppSkeleton not conform FAQ? on: November 10, 2008, 06:33:16
Hi jerry,
good catch!
I will commit the fixed version in the next days.

@Cliff: About the use of constant in Proxy we have to stick the FAQ, but I found usefull to define the notification constants in the proxy for a couple of reason:

- if the proxy can used in more projects, I have to move less files, in the case of ConfigProxy I must to move only this file. Otherwise if I have more proxies that are reused in differents projects, for each proxy I have 2 classes: one for the proxy and one for the constants.

- if the notification is send only from proxy and the other tiers listen it, I found convenience to define in the  proxy this will help me to understand the notification role, if is defined in ConfigProxy I know that is something about Config. I found it usefull when I work in a team.


2  Announcements and General Discussion / General Discussion / Re: first project with pureMVC on: February 04, 2008, 10:32:53
Hi Cliff,
if you want I can work with Phillip and integrate him code in AppSkeleton, have sense?

3  Announcements and General Discussion / General Discussion / Re: first project with pureMVC on: January 28, 2008, 03:10:29
Hi Philip,
thank for the suggestion, we look on it in depth.

For now I can say that I already have a similar implementation that is in the demo repository that Cliff will release soon.

In StartupMonitorProxy there is the addReesource method that have blockChain parameter

public function addResource( proxyName:String, blockChain:Boolean = false ):void
this.resourceList.push( new ResourceVO( proxyName, blockChain ) );

Your implementation is interesting because you can specify the the resources dependancy.

4  Announcements and General Discussion / Architecture / Re: Reset and delete a view on: December 03, 2007, 05:24:25
thanks for your suggestion, I will make a experiment for test this solution, when will be ready I will post.

5  Announcements and General Discussion / Architecture / Reset and delete a view on: November 30, 2007, 06:11:26
Hi all,
I just finish a big project build with Flex and PureMVC, and I'm very happy but I have to optimize a bit.

The project contains about ten views in the main ViewStack, the creationPolicy of viewStage is set to auto.
With this settings the first time that the view is showed, Flex create all needed components,
When the user change view, the old view is hidden and the new showed, but the old still live.
In some cases this is a advantage, because when the user come back to the view the state of all components are the same (ie. a list selection).
But there are cases that this is not a good thing, in my scenario after that the user use a application for some time the memory usage increase, because all views are created and there is not a garbage collection.
And I need also that each time a enter in the view all components are resetted.

I just thinking how to solve this situation and I have had this ideas:

Create a component that listen the change event of ViewStack.
When the component is showed create the mediator and the view.
When the component is hidden remove the mediator and the view from the displayList

<mx:ViewStack id="vwStack" left="0" top="0" right="0" bottom="0" resizeToContent="false" creationPolicy="auto">
   <viewHelper mediatorClass="myMediatorClass">
      <myRealView />

Other little advantage of this solution is that you don't need to create all views mediators inside ApplicationMediator.

Someone have other (more elegant) solutions?

6  Announcements and General Discussion / General Discussion / Re: first project with pureMVC on: November 22, 2007, 09:59:01
Hi deltajam,
if you are using FlexBuilder 3 try to read this: http://www.buntel.com/blog/index.cfm/2007/10/15/The-Export-Release-Wizard

7  Announcements and General Discussion / General Discussion / Re: Popup Window on: November 12, 2007, 11:42:07
Hi Cliff,
I have a little question, if a have a button that open a popupWindow, what's the best way to do it?

- the Component dispatchEvent
- the Mediator capture the event and sendNotification for execute the Command
- the Command call the PopupManger for open the popupWindow (with the PopupManger is only one line of code).


- the Component dispatchEvent
- the Mediator capture the event and call the PopupManger for open the popupWindow


- the Component call the PopupManger for open the popupWindow

8  Announcements and General Discussion / General Discussion / Re: Popup Window on: November 07, 2007, 11:24:53
You have had a good idea!
9  Announcements and General Discussion / General Discussion / Re: Popup Window on: November 07, 2007, 04:34:31
Hi Cliff,
I like the idea to have a manager class.

I have a suggestion, why don't create a wiki where the users can put solutions like it?

10  Announcements and General Discussion / General Discussion / Popup Window on: November 05, 2007, 04:45:02
Hi all, I want to share with you a little code that have found usefull in the project that I just build with PureMVC.
A lot of time I must to open different popup windows each with own Component/Mediator, I have written this code inside ApplicationFacade:

import flash.display.Sprite;
import mx.core.Application
import mx.core.IFlexDisplayObject;
import mx.managers.PopUpManager;

public static function openPopUpWindow( ComponentClass:Class, MediatorClass:Class ):void
var window:IFlexDisplayObject = PopUpManager.createPopUp( Application.application as Sprite, ComponentClass, true );

ApplicationFacade.getInstance().registerMediator( new MediatorClass( window ) );
PopUpManager.centerPopUp( window );

public static function closePopUpWindow( window:IFlexDisplayObject, mediatorName:String ):void
PopUpManager.removePopUp( window );
ApplicationFacade.getInstance().removeMediator( mediatorName );

For open the window you have to call ApplicationFacade.openPopUpWindow( MyComponent, MyComponentMediator );
and for close the window: ApplicationFacade.closePopUpWindow( myComponentInstance, MyComponentMediator.NAME );

11  Announcements and General Discussion / General Discussion / Re: first project with pureMVC on: November 05, 2007, 04:26:37
Hi meekgeek,
your suggestion is very cool and I have modify my ApplicationSkeloton code, the new version can be downloaded here:


I have based the new version to your code but with few differences:
- I have add a parameter to addResource function, because some resources can be loaded before others, ie in my example the config.xml must be read before the other resources.
- I have used a Array insteed a Dictionary becase during the iteration the keys are in different order how are created

I just created this...

I thought this might be a little more reusable then counting.

If someone can advise if it's complying to best practice  :)  I'd like to contribute something to this post.  8)


It's the first proxy to be registered.  All other proxies that need to be loaded before moving on, will call addResource() which adds them to a list of resources.  Once all proxies have been added, you execute a command to call loadResources() which calls load() on all proxies in the list.  Once the individual proxies complete the load process, they call resourceComplete() to advise StartupMonitorProxy that something has finished loading.  It then checks to see if all proxies are ready.  If all proxies check out, it notifies the framework to move on :)

If this is looking like something that other's can use I can upload the files I'm using.
12  Announcements and General Discussion / General Discussion / Re: first project with pureMVC on: November 05, 2007, 02:34:04
Yeah, I see that, but in the code, ApplicationFacade calls ApplicationStartupCommand which add two sub commands, ModelPrepCommand and ViewPrepCommand.  I can't find where StartupMonitorCommand is used.  Am I downloading a different zip?

Sorry if I'm missing something right in front of my face.  I'm new to this framework.  Heard this was better than cairngorm ;)

Hi meekgeek,
the file StartupMonitorCommand  isn't used, you can delete it, sorry but I forgot to delete before post the zip :)

13  Announcements and General Discussion / General Discussion / [OT] there are italian here? on: October 12, 2007, 03:44:45
Hi all,
I'm little curious and today I have asked to Cliff if there are italian members, he have asked that don't know it and try to write a post in the forum.
So, I ask to all italian members to contact me (you can send me a private message http://forums.puremvc.org/index.php?action=pm;sa=send;u=11), I would like to make a little pureMVC-it community.

14  Announcements and General Discussion / General Discussion / Re: first project with pureMVC on: October 12, 2007, 03:34:45
Hi Adam,
I hope that you have already solved you issue, sorry but I'm very busy.
I think that you have to manage your player security settings:


15  Announcements and General Discussion / General Discussion / Re: Reusing components as subcomponents / dynamic mediators on: July 24, 2007, 03:53:13
thanks I must to start to code for found the right way for all the cases .... but I will do after my vacation that start tomorrow.

Pages: [1] 2