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 [3] 4
31  Announcements and General Discussion / General Discussion / Re: Using MacroCommand with StartupResourceProxy utility on: June 25, 2009, 02:03:56
I think I have confused myself above measure! I need to start a new thread with the corresponding acronyms. I have started the same application 3 times from scratch and I still get stuck on the same spot. The only thing this time is that I have been able to understand the behaviors of all the actors in a better way. Still questions arise and for those I should start a new thread...
32  Announcements and General Discussion / General Discussion / Re: Using MacroCommand with StartupResourceProxy utility on: June 24, 2009, 07:55:53
Thanks for the clarification.

I have run into another issue and this might have to do with understanding the SM, for what I understood originally setting the different states on the application would help us to stay within a specific state.  Using the door example you cant go from LOCKED to OPENED you just go LOCKED->CLOSED->OPENED, so if I start my application in the LOCKED state and then i send a "OPENED" notification, I am able to see that this specific notification has been sent without any errors. Shouldn't I be able to get an error that this kind of event can't happen? Or is that a logic that I must write within my app?
33  Announcements and General Discussion / General Discussion / Re: Using MacroCommand with StartupResourceProxy utility on: June 23, 2009, 12:05:48
I've used the SM with macro commands before, it works almost exactly the same (except you need to grab an instance of the SM in each command.

Where are you having trouble? I usually have my first macro command set-up the initial SM and then each command add what it needs to it. Then the last macro starts the loading process.

Thanks for your suggestion as well. I think this might answer my issue. My problem was that I didn't know how to keep track of my macrocommands at the same time as setting up the elements with the SM.

Thanks again.... I will let you all know how it goes
34  Announcements and General Discussion / General Discussion / Re: Using MacroCommand with StartupResourceProxy utility on: June 23, 2009, 12:03:55
Does it help that you can, at any time, use the getResourceList() method of StartupMonitorProxy to get the IResourceList object that contains the StartupResourceProxy objects, and getResources() on that returns an array of the StartupResourceProxy objects?
----Philip

it does help! I didn't know you could do that. I need to take another look at the class to see how I can push elements that are being added through the "AddSubCommand" method.
35  Announcements and General Discussion / General Discussion / Using MacroCommand with StartupResourceProxy utility on: June 22, 2009, 03:08:49
I have an example that I am following and works great with the Simple command, but I also have another example that uses MacroCommands, honestly I like how the project is layed out with the Macrocommand
         
EXTENDING MACROCOMMAND:

:
override protected function initializeMacroCommand():void
{
addSubCommand( command1 );
        addSubCommand( command1 );
        addSubCommand( command1 );
}
            
VS
            
EXTENDING SIMPLECOMMAND:

:
override public function execute( note:INotification ): void
{
40 lines of code here that with subcommands they could all be broken into their own class.....
}
                  
one thing that I can't live without is a "monitor" that keeps track of what assets are being added to the StartupResourceProxy so I am forced to put everything in one class.
            
:
private function makeAndRegisterStartupResource( proxyName:String, appResourceProxy:IStartupProxy ):StartupResourceProxy
{

var r:StartupResourceProxy = new StartupResourceProxy( proxyName, appResourceProxy );
 facade.registerProxy( r );
_monitor.addResource( r );
return r;
}
         
My idea of distributing everything in subcommands is creating another Proxy that would keep track of the resources being added and provide feedback but this seems to be over work, is that the correct way to handle this issue?
            
36  Announcements and General Discussion / General Discussion / StateMachine Sample Door on: June 22, 2009, 01:52:17
In the statemachine presentation in puremvc.org there is the mention of a door handle as an application to this concept. Is there source code for such application out there?
      
There reason why I am asking is because I don't know where to start in regards to the instatiation of the class. Granted the presentations go in great detail on where to place the XML and how to declare your states but the basics of where do you instatiate the class are left behind.
      
I apologize for those who seem this request rather absurd or noobish. There are some of use out there who would greatly benefit from this information. Just right now I am working on a project where I need to save the state of the application and I would like to use the StateMachine but I am not sure where to place it.
      
37  Announcements and General Discussion / General Discussion / Re: Proxies or ValueObjects on: May 08, 2009, 02:41:06
Cliff,

Thank you for taking the time to explain in such detail the idea behind of what the StateMachine , and for giving me the references to items that I can use as reference to "fix" my dilemma.

I am going to try to implement the StateMachine in the best of my abilities and hope that I am able to do it right. Some how coming from a non-technical background makes it difficult to grasp all the concepts at once.

I hope one day I can integrate analogies as you have done to my explanations to make it easier for people to grasp the concepts.

38  Announcements and General Discussion / General Discussion / Re: Proxies or ValueObjects on: May 06, 2009, 03:36:10
disregard my question, I am looking at pages 34-46 from the Best Practices document and I believe that explains what I need to know perfectly.
39  Announcements and General Discussion / General Discussion / Proxies or ValueObjects on: May 06, 2009, 02:19:31
So far i have been using the value objects to hold data that a proxy can retrieve and dispatch an event when the update has been completed. I have a small dilema. I have to keep somehow the state of the application, the application can have 3 positions and i need to keep track of the position of when it changes or when it has been changed. In this case do I need to write a Proxy that will wrap a VO with this information?
   
It might look like a lot of work at first just to keep track of onee property but I want to be able to do it right with small items to be ready when I need to apply the same concept to a larger scale.
40  PureMVC Manifold / Contributor Central / Re: Unified Assets loader on: March 30, 2009, 03:42:42
Has this project been abandoned?
41  PureMVC Manifold / Demos and Utils / Re: StartupManager - A PureMVC AS3 Utility on: March 26, 2009, 12:44:06
Hi,

Is there any reason why this code:
:
import mx.collections.ListCollectionView;

    import org.puremvc.as3.utilities.startupmanager.model.RetryParameters;
    import org.puremvc.as3.demos.flex.startupasordered.ApplicationFacade;

    private var facade:ApplicationFacade = ApplicationFacade.getInstance();

    public static const RETRY :String = "retry";
    public static const LOAD :String = "load";
    public static const TRY_TO_COMPLETE :String = "tryToComplete";

    [Bindable] public var customerStatus :String = "";
    [Bindable] public var productStatus :String = "";
    [Bindable] public var salesOrderStatus :String = "";
    [Bindable] public var debtorAccountStatus :String = "";
    [Bindable] public var invoiceStatus :String = "";
    [Bindable] public var overallStatus :String = "...";

    [Bindable] public var notifications :ListCollectionView;
    [Bindable] public var retryIsVisible :Boolean = false;
    [Bindable] public var retryIsEnabled :Boolean = false;

    public var retryParameters :RetryParameters = new RetryParameters();
    [Bindable] public var paramsEntryIsEnabled :Boolean = true;
    [Bindable] public var mode :int =1;

    [Bindable] private var initialMaxRetries :int = retryParameters.maxRetries;
    [Bindable] private var initialRetryInterval :Number = retryParameters.retryInterval;
    [Bindable] private var initialTimeout :Number = retryParameters.timeout;

    private function goLoad() :void {
        updateRetryParameters();
        if (mode == 1)
            sendEvent( LOAD );
        else
            sendEvent( TRY_TO_COMPLETE );       
    }
    private function sendEvent( eventName :String ) :void {
        dispatchEvent( new Event( eventName ));
    }
    private function updateRetryParameters() :void {
        retryParameters = new RetryParameters( maxRetries.value, retryInterval.value, timeout.value );
    }

is placed inside the MXML document rather than in the ApplicationFacade? I am asking this because I am working on a flash application (not Flex) and I use Main.as as my main entry point to the application and ApplicationFacade as the entry point to PureMVC and I'm not sure in this case where exactly the events and properties should be moved into.
42  Announcements and General Discussion / General Discussion / Re: What does VO stands for? on: March 24, 2009, 11:44:12
Thank you! It all makes sense now.
43  Announcements and General Discussion / General Discussion / What does VO stands for? on: March 24, 2009, 11:18:02
I have seen couple of references to VO but I still can tell what VO stands for.

For example see this line extracted from the following thread:
http://forums.puremvc.org/index.php?topic=950.msg4409#msg4409

"You can just respond to the page change by immediately parsing the segments into a VO, then store in a proxy, which fires off the note that there's a new URL to organize the app around. No need to break into all these steps.

And I'd put this in a Proxy. If other proxies need it they retrieve that proxy to get the info.

-=Cliff>"

Both times I have seen the reference to VO it seems like it has something to do with a Proxi but I still cant quite get it. MVC... VO? :)
44  Announcements and General Discussion / Getting Started / Re: Where do I keep a reference to my Stage? on: March 23, 2009, 05:48:50
Interesting! I was talking about this with a coworker and we were discussing 2 options.

1 would be to pass a reference of the stage during the Mediator instantiation giving us the flexibility in the future to change targets ( where the object is being created, say we want to use a sprite or movieclip in the future)

2 get the target object dynamcally as you explained earlier, which I like best but see the issue of maybe not being as flexible because we have to hard-code the target.

Either way it will be hardcoded and I guess I might be just over thinkng it. What do you think?

I will look at the samples you mentioned.
45  Announcements and General Discussion / Getting Started / Re: Where do I keep a reference to my Stage? on: March 23, 2009, 03:30:24
Hi,

Thanks for the response, I was looking at the board and found this topic:

http://forums.puremvc.org/index.php?topic=812.0

Which is similar to what I am doing but in that case it is suggested to "save" the information in a Proxi. Which would be more valuable? Using a Proxi or a Mediator? My logic tells me that the Mediator should be the way to go but I am curios how the other post took the Proxi route.
Pages: 1 2 [3] 4