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: LOADING_COMPLETE: start up manager - but not all loaded  (Read 9961 times)
landed
Full Member
***
Posts: 37


View Profile Email
« on: August 21, 2009, 02:53:18 »

Any one had any issues with the startup manager utility not correctly sending the
LOADING_COMPLETE: all resources have been successfully loaded

notification ! I'm having to manually throw in flags and if statements that the manager should be taking care of for me !

thanks for any insight or ways to debug this. I'm using a multiton

the notification should come after all my resources i registered have done loading but doesnt.

I'm wondering ...
Logged
philipSe
Sr. Member
****
Posts: 139


View Profile Email
« Reply #1 on: August 21, 2009, 06:09:22 »

What version of StartupManager are you using?

From the topic title and the content of your post, I take it that the manager is issuing the loading complete note before you have sent all the loaded notifications.

The getResourceList() method of StartupMonitorProxy could be useful; this returns an IResourcelist which offers a length property, which will tell you how many resources the monitor thinks it is managing.  IResourcelist also offers getResources() which returns the array of StartupResourceProxy objects that the monitor is managing.

The getLoadedResources() method of StartupMonitorProxy could be useful; this returns an array of StartupResourceProxy objects.  This would show you the resources that the monitor thinks have been loaded.

Hope this helps.
----Philip
Logged
landed
Full Member
***
Posts: 37


View Profile Email
« Reply #2 on: August 21, 2009, 12:44:11 »

I stepped through things and both resources are getting managed and loaded just that the loading complete happens too early. Well I had to throw in my own loading flags so its done now. But I might not be so quick to use startup manager again. Though I have seen some examples working ok.
Problems with it not recognising the method setTimeout also dont fill me with confidence.
Logged
philipSe
Sr. Member
****
Posts: 139


View Profile Email
« Reply #3 on: August 24, 2009, 03:02:51 »

Well I had to throw in my own loading flags so its done now.
You'll understand that I'm not happy that you had to do this.  There has been no feedback on the forums indicating the sort of problem that you have had. Could you help me out by answering some questions?

What version of StartupManager swc are you using?

Since
both resources are getting managed and loaded
, I presume the utility is processing the second loaded notification.  When is the loading complete being sent? Do you mean after the first  loaded notification is sent by your app and before the second loaded notification is sent by your app?

An important point is whether your observance of the sequence of notification sending is based on the handling of notifications in a mediator.  See this topic regarding the sequence of processing of a "data loaded" notification.
http://forums.puremvc.org/index.php?topic=1049.msg4816#msg4816

If there is any of your app code that you could send me, or post here, that might enable me to reproduce or diagnose your problem, that would be great.

As regards non-recognition of setTimeout(), this could be a misunderstanding of versions and API; there was a timeout property (public access) in StartupResourceProxy pre v1.3, replaced by a retryPolicy property in versions 1.3 and following.  V1.3 was released 21-May-2008.
----Philip
Logged
landed
Full Member
***
Posts: 37


View Profile Email
« Reply #4 on: August 25, 2009, 07:21:56 »

I am not using any swc, they were giving me issues and my main code is here, it doesnt look quite right to me somehow
:
override public function execute(notification:INotification):void
{

var app : Globe3D = notification.getBody() as Globe3D;
facade.registerMediator( new ApplicationMediator( app ) );

facade.registerProxy( new StartupMonitorProxy() );

_monitor = facade.retrieveProxy( StartupMonitorProxy.NAME ) as StartupMonitorProxy;

//create a quick and dirty data store
facade.registerProxy(new Arrayz());
facade.registerProxy(new LocaleDataProxy());

var odstProxy:OdstDataProxy = new OdstDataProxy();
var tweetProxy:DataProxy = new DataProxy();
facade.registerProxy(odstProxy);
facade.registerProxy(tweetProxy);


var rTweetProxy:StartupResourceProxy = makeAndRegisterStartupResource(DataProxy.SRNAME, tweetProxy);
var rOdstProxy:StartupResourceProxy = makeAndRegisterStartupResource(OdstDataProxy.SRNAME,odstProxy);

rTweetProxy.requires = [ rOdstProxy ]; //for the swear words
_monitor.loadResources();
}
Logged
philipSe
Sr. Member
****
Posts: 139


View Profile Email
« Reply #5 on: August 26, 2009, 04:39:53 »

Thanks for the code; it looks fine.

I had hoped that the point I made in my last post about the sequence of notification sending might be the explanation for your query.  Have you checked out the link I included?

If that is not the  explanation, then
- I think we need to get onto some solid ground as regards the sm code and versions
- if you don't need to customise the utility in some way, then the swc should be used
- I suggest you get a specific swc; version 1.6.1 is the latest release of StartupManager
- if there are compile issues with that, and there shouldn't be, let's deal with them.

----Philip
BTW, the startup manager is now at v2.0 and has been renamed as Loadup; Loadup was released recently.
Logged
landed
Full Member
***
Posts: 37


View Profile Email
« Reply #6 on: August 27, 2009, 02:58:06 »

I didnt really understand what was being said in the link you gave me. I think perhaps there was some version issues the requires parameter didnt seem to do anything either.
I will try Loadup with new projects but will keep an eye on it. Also I think that there could be better instructions on where the libraries should go or using the swc's like you say if its not to be customised the swcs are better.
Also I would make a distinction between multicore if needed, I never knew if this was my issue here, there was not documentation on if that needs to be handled differently.
Logged
Pages: [1]
Print