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  PureMVC Manifold / MultiCore Version / AsyncCommand error when waiting for an event to completeCommand on: June 24, 2009, 08:49:32
Hi guys, i have a pretty taught problem here, hope someone could help me solve it.

I work on the multicore version.
I have an AsyncCommand wich is part of a bigger AsyncMacroCommand.
In this command i retrieve an object (a module that work as another core) and set a listernet on it for a custom event.
After that i send a message (sendNotification) to that core, to perform some operations. When those operations ends the custom event is dispatched.
In the listener I setted before, i call the commandComplete method.

The problem is that when the commandComplete is called it throws a runtime error that tells me that:
Main Thread (Suspended: TypeError: Error #1006: value is not a function.)   
"value" is referred to the onComplete variable of the AsyncCommand class, wich is null

I'm doing something really bad and i should rethink the logic of the application or it should work in this way and i spotted a bug?

many thanks to anyone who can help
2  Announcements and General Discussion / General Discussion / Re: [StartupMonitor] getFailedCount on RETRYING_LOAD_RESOURCE - impossible? on: July 03, 2008, 01:58:12
thank you philip, no hurry though :)
by now I've modified the notification to pass the IStartupResourceProxy instance in the body instead of the name of the "original" proxy
3  Announcements and General Discussion / General Discussion / [StartupMonitor] getFailedCount on RETRYING_LOAD_RESOURCE - impossible? on: July 01, 2008, 10:28:14
hi again,
i can't find an (easy) way to get the number times a resource failed to load when i receive the StartupMonitorProxy.RETRYING_LOAD_RESOURCE notification

the notification body contains the name of my proxy ("DataProxy" in my case) and not the name used by StartupMonitor (would be "DataSRProxy") and i can't find out a way to retrieve the IStartupResourceProxy instance related to that resource

not to mention that, even if i find the correct IStartupResourceProxy, the interface does not expose the method to get the count of failed loading

i'm trying to do some modification on my own to the StartupMonitor to make the whole thing easier, but i would like to know if it was done in that way for some reason
4  Announcements and General Discussion / General Discussion / Re: Startup utility with dynamic resources on: June 24, 2008, 07:00:18
first of all, excuse me for posting in the wrong board  :-[ hope someone can move it to the right one

most of the code i'm using it's taken from the StartupAsOrdered demo, so i think (hope) i'm addind resources and dependencies in the correct way and yes, my ResourceProxy do implements the IStartupProxy interface but i have only one generic proxy for every resource.

i think my error it's that i'm not sending a loaded notification, but i'm not so sure, mostly because if i don't use any requirements everythings gets loaded (but maybe that's the way it's intended to work)

i've posted my source here http://cyberpunk.l33t.it/puremvc/srcview/ for a better understanding of the problem
it's a bit silly but it's just a test to see how things works ^_^
5  Announcements and General Discussion / General Discussion / Startup utility with dynamic resources on: June 24, 2008, 12:11:36
Hi everyone!
I'm new to the forum and to PureMVC.
I've started a couple of days ago to wrap my head around its structure and implementation.
Actually i'm making my tests with the standard edition but i plan to switch to the multicore edition pretty soon, cose my projects are often build in modules and i will like to keep "separated" the various module's implementation.

Now i'm giving a try to the utilities, the StartupManager utility actually, wich is great indeed.
I'm just having some problem adding some resource dynamicalli while using requirements ...

i've a generic "ResourceProxy" to handle the loaded resources in wich the SRNAME is generated by an id that I pass to the constructor along with the resource url ... so, these are my steps:

- in the startup command i load an xml file ("config.xml") in wich are listed the other resources.
- i call the keepResourceListOpen method on the monitor
- when the WAITING_FOR_MORE_RESOURCES notification is received by the mediator i send a notification who trigger LoadAssetsCommand
- LoadAssetsCommand parse the config xml, add the new resources and then call closeResourceList on the monitor

now, everything is ok since i put in some requirements.
let's say that resources B C and D need that resource A is loaded ...
i keep a reference to the StartupResourceProxy istance used for resource A and pass it to the other resources

the StartupManager now loads only resource A and then stops, without any error, message or notification, ignoring the other resources ...

i feel like i'm doing something wrong, but i can't figure out what ... so, thanks to anyone who can help ;)
Pages: [1]