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: StartupManager utility defaultRetryPolicy  (Read 7882 times)
lordnahkim
Newbie
*
Posts: 8


View Profile Email
« on: February 21, 2009, 01:52:20 »

I'm hoping to get some help from someone familiar with the AS3 StartupManager utility http://puremvc.org/pages/utils/AS3/Utility_AS3_StartupManager/asdoc/ -  It is awesome!  I'm just stuck on how to implement the defaultRetryPolicy?  What exactly is it looking for? I looked at the docs but they're above my head.  I appreciate any guidance on this.  Thank you so much.


--Also, on the same front - using this utility, where's the best place to put my final "INIT_SITE" notification call for when my startup items are all ready?  It seems strange to just figure out what the very last startup item should be.  Is there a way to piggyback on the startup utility to determine when everything is loaded?
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #1 on: February 22, 2009, 09:25:12 »

The best place to post this is in the thread for startup manager under the AS3 Standard version demos and utils. This will catch the attention of the author of the utility, and leave the answer in a handy place for others to find. I'm on a phone and can't move the thread, but will when I'm at my desk tommorow.

-=Cliff>
Logged
philipSe
Sr. Member
****
Posts: 139


View Profile Email
« Reply #2 on: February 23, 2009, 10:02:32 »

I'm just stuck on how to implement the defaultRetryPolicy?  What exactly is it looking for?
An example of the setting of the defaultRetryPolicy, taken from the initial setting within the StartupMonitorProxy class, is as follows
:
  _defaultRetryPolicy = new RetryPolicy( new RetryParameters(0, 0, 300) );
This is the default policy that will apply, unless you make your own assignment, say as follows
:
monitor.defaultRetryPolicy = new RetryPolicy(...);
where monitor is the reference to your StartupMonitorProxy object.

The 3 parameters to the RetryParameters constructor are explained in the api docs for the RetryParameters class.  They are maxRetries, retryInterval, timeout.  If you need further explanation, please post again.  Have you looked at the StartupAsOrdered demo?

Is there a way to piggyback on the startup utility to determine when everything is loaded?
When everything is loaded, the SM utility sends a LOADING_COMPLETE notification.  You can write your app so that this triggers a Command or some action in a Mediator.  But note there is also the possibility of a LOADING_FINISHED_INCOMPLETE notification.  See the api docs for the StartupMonitorProxy class, where the various notifications are listed. Again, if you need further explanation, please post again.

----Philip




« Last Edit: February 23, 2009, 10:05:36 by philipSe » Logged
lordnahkim
Newbie
*
Posts: 8


View Profile Email
« Reply #3 on: February 25, 2009, 01:51:16 »

Sorry about that Cliff, I didn't notice that better thread for this.  I apologize for the inconvenience. 

Phillip, thank you so much, your guidance is sincerely appreciated!
Logged
Pages: [1]
Print