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
16  PureMVC Manifold / Demos and Utils / Re: Calendar - A PureMVC AS3 / Flex / Django Demo on: April 25, 2008, 09:15:14
I'd really like to apply some of the Getting Things Doneā„¢ (GTD) approach.

Implies implementing 3rd parties' objects as native objects to P's framework? I've wondered about a simpler approach using GData's API generate VOs' definitions for various class actors - for example...when typing a time-based member - use GData's Calendar/Event API;  a person/account/addressable object would look to GData's Contact API. Extensions and exceptions handled the same way GData's does - by adhering Atom's Syndication format.

Enjoy the beach and pay never no mind to us poor, rain-soddened midwesterners waiting for a glimpse of that 80%.


sorry if i sound so remorseful...it's just that since the primaries having moved on and all...just seems like no one cares anymore.
17  PureMVC Manifold / Demos and Utils / Re: StartupManager - A PureMVC AS3 Utility on: April 23, 2008, 07:19:05
Thx much for the review and comments. I'm going to have a look to to see if things work better if the AssetManagerProxy is just a plain old proxy instead of typing to a Startup manager - or otherwise establish the list of assets to import prior to invoking 'loadResources'.

Don't be too sure about my 'knowingly-ness'. I'm inclined to live with stupid code if they work or even seem to. I understand that attitude might disqualify me from communion with those of more pure motivations so I'm trying to upgrade my skills and raise my standards. ;)

in AssetProxy, swf2Load is a String but is used also as type IStartupProxy.

falls into that category. Since I need swf2Load to be a string at one point and a of type IStartupProxy at another, what would be a more correct approach?

As to the bigger picture of accommodating dynamic assets, I think I'm fairly close to meeting my own short-term purposes so I probably won't be agitating for more attention to this issue unless/until someone else needs something along these lines.

That said...I still think management and monitoring (logging) of issues pertaining to application startup deserve more attention.

again...thankx for your time
18  PureMVC Manifold / Demos and Utils / Re: RSS Headlines - A PureMVC AS3 / AIR Demo on: April 21, 2008, 08:58:14

Any chance of getting this updated for most current AIR release?

19  PureMVC Manifold / Demos and Utils / Re: StartupManager - A PureMVC AS3 Utility on: April 21, 2008, 07:13:10
I've made some progress with the dynamic asset loader sample - things correctly load when the called clip is present and correctly ioError when not present. My current problem boils down to the correct way to let the Startup Manager know that the process is complete.

Reviewing....I have concrete proxy called AssetManagerProxy that loads an xml list which declares what SWFs will be loaded. It's result handler triggers a command that dynamically instantiates an AssetProxy for each item on that list. If my AssetManagerProxy fires it's sendLoadedNotification at the point that it actually loads (as found in the StartupAsOrdered demo) none of the AssetProxies have yet been created and I end up with smCallOutOfSynchIgnored messages.

Deferring the sendLoadedNotification will eliminate the smCallOutOfSynchIgnored messages but cause other problems. Current code at juststeve.com/StartupAssets.zip

many thankx
20  Announcements and General Discussion / Architecture / Re: Mediators give me headaches on: April 18, 2008, 10:33:33
(luckily my hack to the framework to trace out when notification fire should come in handy here)

i'm thinking a native logging utility would come in handy lots of places. nudgenudgewinkwink
21  Announcements and General Discussion / Architecture / Re: Mediators give me headaches on: April 10, 2008, 02:53:03
Is this something the StartupManager Utility can address?
22  PureMVC Manifold / Demos and Utils / Re: StartupManager - A PureMVC AS3 Utility on: April 10, 2008, 02:14:28
Still stumped by how to dynamically name a StartupResourceProxy. In pre-AS3 days i'd do something like:
   var this["rAsset" + swf2Load] :StartupResourceProxy = makeAndRegisterStartupResource( SRNAME , this);

That seems not to be an option anymore.

23  PureMVC Manifold / Demos and Utils / Re: StartupManager - A PureMVC AS3 Utility on: April 10, 2008, 07:07:49
@ trilec - understood.  I'm trying to establish the point that the StartUpManager utility is not a simple pre-loader in the sense of graphic loading bar preloader we are used to using in Flash.

2. In constructor to AssetProxy, why not pass in an asset counter, for example the i subscript of MData,  and use it to make the NAME and SRNAME unique?  As you say, for the utility, the IStartupProxy NAME must be unique.


Perhaps I'm not following.... NAME and SRNAME are already made unique by prepending the name of the asset to the strings 'Proxy' and 'SRProxy'. It's the var that store the return of the makeAndRegisterStartupResource command that (i think) needs to be addressed.

thkx much for the time
24  PureMVC Manifold / Demos and Utils / Re: StartupManager - A PureMVC AS3 Utility on: April 10, 2008, 04:47:53
25  Announcements and General Discussion / General Discussion / Re: Updated Courseware?? on: April 10, 2008, 04:44:03
Hasn't happened yet. There are changes to Flex Builder itself (screen shots change from FB2 to FB3) as well as the move to v 2 of PureMVC itself. I'm sure this is high on Cliff's 2-do list.
26  PureMVC Manifold / Demos and Utils / Re: StartupManager - A PureMVC AS3 Utility on: April 10, 2008, 04:41:24
In the context of 'theory of operation' i think every thing starts from the fact that this utility grew out of an exploration of best practices for initializing a PureMVC application. Today's applications rely on certain resources having been loaded before real work can begin and 'resources' means more that a list of images (as was often the case in earlier ages).

So StartupManager helps implement the loading (and verification of load status) 'resources' required by a given application. Resources is loosely defined to include configuration settings as represented by AppSkeleton and successful completion of some 'processes' in some specific order as seen in StartupAsOrdered.

New users should understand that they need to add code that defines what those resources are, and what constitutes a successful load. The utility includes methods that allow us to define dependencies and retry/timeout properties. Users should not look to the utility to provide graphic 'pre-loader' status type display.

Since the utility is a fully 'PureMVC creature', studying how various demos implement different  processes will provide a better handle on PureMVC as a working framework. For example, looking at how a co-utility 'Asynchronous Stub' is used in StartupAsOrdered's delegate provides a powerful lesson in de-coupling dataprovers from a project while still delivering objects that fill-in until specfic backend data providers are needed.

>> Please consider the above thoughts to be a draft of 'theory of operation' overview and feel free to
>> specific other topics that need coverage or re-interpretation.

And now a request for some help with a demo that will show use of the utility to pre-load media (swf in this case) files where run-time code does not know the names of the files to be loaded.

I'm creating a pair of proxies that work together (each presumes the presence of the other) in a parent/child or ItemManager/Items relationship. AssetProxyList retrieves an xml file containing the names of SWF to be loaded. Upon successful load of that xml file AssetListProxy notifies the Startup Manager and fires the LoadAssetCommand which loops thru the list of assets creating a AssetProxy on each iteration.

The demo will run to completion without tossing an exception (which I count as a moral victory). However....it displays the message 'Loading Complete' after the AssetlistProxy has loaded but before the AssetProxy instances have started. Makes sense since prior to the loop that instantiate the Asset instances (the children) Startup Manager only knew about the ListProxy (parent).

Also, the Manager is generating a OutOfSynch message for each of the assets loaded ...even though it also generates those assets as successfully loaded. I think it has to do with how the Proxy registers itself - each iteration uses the same name for the StartupResourceProxy:

The constructor:
public function AssetProxy( swf2Load:String ):void {
NAME = swf2Load + "Proxy";
SRNAME = swf2Load + "SRProxy";

this.swf2Load = swf2Load;
super( NAME );

then the load:
public function load() :void {
var delegate : LoadAssetDelegate = new LoadAssetDelegate(this, 'assets/' + swf2Load + '.swf', tempClipHolder );
sendNotification( ApplicationFacade.ASSET_LOADING, swf2Load );
    this.monitor = facade.retrieveProxy( StartupMonitorProxy.NAME ) as StartupMonitorProxy;

// This var definition should probably be created with a dynamic name - How?
var rAsset :StartupResourceProxy = makeAndRegisterStartupResource( SRNAME , this.NAME as IStartupProxy);


Additionally, I'd like to start all the loaded clips in and ArrayCollection within AssetListProxy so other code knows where to find/play those clips.
So I include this code in the AssetListProxy:
public function add2ClipHolder( assetClip: MovieClip):void{

public function ClipHolder():ArrayCollection{
return clipHolder;
And attempt to gain access to that object from the AssetProxy but have so far failed to success. Any thoughts how to handle this?

Further...this arrangement of AssetList and Assets is obviously a common pattern where a Manager maintains info on an 'x' number of items. What features/corrections/refinements would my code need to be more formally in-line with that pattern?

27  Announcements and General Discussion / Getting Started / Any samples of dynamic notification handling? on: April 06, 2008, 04:48:45
The HelloFlash demo shows a dynamic mediator being registered. Is there anything listing how to handle a dynamically named body property being passed to a notification handler?

A proxy constructor that looks like
public function AssetProxy( swf2Load:String ):void {
//rename name vars
NAME = swf2Load + "Proxy";
SRNAME = swf2Load + "SRProxy";

this.swf2Load = swf2Load;

super( NAME );

Would like to send the value of 'swf2Load' as the body payload of a sendNotification.

28  PureMVC Manifold / Standard Version / Re: retrieveMediator / retrieveProxy on: April 06, 2008, 04:40:04
If you need dynamically named Proxies or Mediators refer to the HelloFlashMediator in the HelloFlash demo for an example.


Is that the HelloSpriteMediator?

As an aside....I've noticed a number of places where a 'private var foo:bar' closes out a class - after all the methods instead of the more typical location at the beginning. Just happenstance, or does it indicate anything in particular?

29  PureMVC Manifold / Demos and Utils / Re: StartupManager - A PureMVC AS3 Utility on: April 06, 2008, 07:58:38
On the topic of documenting the Startup Manager....

I'm not sure if Cliff just missed Phillip's API documentation or what but, having reviewed that - I don't see how I can add much of value until/unless the utility actually takes on new tasks. Might be worth adding the historical overview from earlier in this thread but beyond that...great job!

Though perhaps Cliff was referencing documentation of the Demo itself.


30  PureMVC Manifold / Demos and Utils / Using Startup Manager to dynamically add resources. on: April 06, 2008, 07:49:13
Continuing the discussion of using the asset loading feature of Startup Manager to load assets at runtime....

I've refactored StartupAsOrdered so as to built a list of assets to load and am stuck on exactly how to insert them into the StartupMonitorProxy.

In a nutshell, I've created a proxy (AssetListProxy) that produces an array of strings intended to be the filename of swfs that need load management.
public function result( rpcEvent : Object ) : void
// call the StartupMonitorProxy to notify that the resource is loaded
sendLoadedNotification( ApplicationFacade.ASSETLIST_LOADED, NAME, SRNAME);
//parse the xml down to an array of swfs to load
mData = XmlResource.parse(data, rpcEvent.result);

//tosses error on reference to 'app'
sendNotification( ApplicationFacade.LOADASSETS, app );

I'm now attempting to call my LoadAssetsCommand where I intend to retrieve the array of swfs to load and create loop that will produce and register a StartupProxy for each in the list.

My problem is correctly referenceing 'app' in the call to my newly created LoadAssetsCommand.  Would appreciate any kickstarts. Project exported to FB3 archive at http://www.juststeve.com/StartupAssets.zip

Pages: 1 [2] 3 4