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  Announcements and General Discussion / General Discussion / Adobe Strobe or Open Source Media Framework on: October 26, 2009, 09:07:26
Has anyone in the PureMVC community integrated the OSMF platform into PureMVC yet?  Has anyone else looked into it?
2  Announcements and General Discussion / Fabrication / Reaction to FlexEvent? on: March 29, 2009, 12:44:37
Can anyone confirm that they have this working?  I'm trying to listen to a creationComplete from my application with my Mediator, however it does not seem to get called.  However, I have a handler that listens for resize that works just fine.

so to cap off:

reactToApplicationResize( e:Event ) - works just fine;
reactToApplicationCreationComplete( e:FlexEvent ) - does not work

any ideas?
3  PureMVC Manifold / MultiCore Version / Module vs Application on: March 23, 2009, 05:48:49
When is the best time to use another Application container, and when is the best time to use Modules?  If I have an Application that has 5 main categories, should each category become a module, or another Application container?  And if I use Module, can I load multiple modules inside modules ... inside modules?  Is it possible to have 'n' number of modules loaded inside each other?

Just wondering what the best practice would be ..
4  Announcements and General Discussion / Fabrication / RetrieveProxy returns null? on: March 06, 2009, 03:20:23
Hi, I have a Shell app that loads in a module, and then a command inside that module that registers a few proxies and a few mediators inside.  I have the following code:

public class LocationStepMediator extends BaseStepMediator
public static const NAME:String = "LocationStepMediator";

public function LocationStepMediator()
super( NAME );

override public function onRegister():void
var _proxy:LocationStepProxy = facade.retrieveProxy( LocationStepProxy.NAME ) as LocationStepProxy;
trace( _proxy );


but my proxy is returning null.  Why would this be?  How do I grab the correct facade instance?  I've loaded my proxy before mediator ... surely this should work?  I feel like it's something simple ..
5  PureMVC Manifold / MultiCore Version / Trying to understand multicore on: March 06, 2009, 08:01:47
Ok, so I've got my module loaded into my application.  Check.  Now I would like to understand the initializeNotifier method and onRegister method a little better.  What is the difference between the two? When would I use one and not the other?  Currently, I have a mediator that registers a proxy, and then tried to retrieve it shortly after ... but it retrieves null.

It's driving me nuts.  I've made break points ... debugged, etc.  I just can't figure out why my proxy retrieves null.  I've seen other posts like this ... but not much from the multicore arena.

 Thanks for any help!
6  PureMVC Manifold / MultiCore Version / Module hell. ModuleEvent won't fire. on: March 04, 2009, 04:38:03
I can't figure this out.  I'm going to rip my hair out.  My module is loading with one of the Fabrication examples I modified.  "loading"

However, I can't add the module to the display list, because the ModuleEvent class won't fire anything back! 

trace( moduleVO.url );
var moduleLoader:FlexModuleLoader = new FlexModuleLoader();

moduleLoader.id = moduleVO.getElementID();
moduleLoader.url = moduleVO.url;
moduleLoader.router = applicationRouter;

if (moduleVO.moduleGroup != null)
moduleLoader.moduleGroup = moduleVO.moduleGroup;
moduleLoader.defaultRoute  = moduleVO.moduleGroup;
moduleLoader.defaultRouteAddress = applicationAddress;

moduleLoader.addEventListener(FabricatorEvent.FABRICATION_CREATED, moduleCreated);
moduleLoader.addEventListener(FabricatorEvent.FABRICATION_REMOVED, moduleRemoved);
moduleLoader.addEventListener(ModuleEvent.READY, moduleReadyListener);
trace( moduleLoader );

My module loads, because my console says it does ... but I can never seem make it to this function:

private function moduleReadyListener( event:ModuleEvent ):void
trace( "module ready!" );
event.target.removeEventListener(ModuleEvent.READY, moduleReadyListener);
moduleContainer.addChild(event.target as DisplayObject);

any sugestions.  I feel like this is something really simple.  Why wouldn't the eventListener be ... listening?
7  Announcements and General Discussion / Architecture / External swf uses PureMVC framework ontop of existing framework. on: December 10, 2007, 07:07:25
I have one "Main" swf that loads a bunch of other swf files into it.  "Main" has a ApplicationFacade Class that initializes the concrete Facade.

One of the swf files, "Introduction", is complex and is also built using the PureMVC framework, has an Application Facade class, and initializes the concrete facade.

My problem, is that since the root swf "Main" has already initialized the Facade, I'm unable to load my external swf "Introduction" on top, because this line:
var facade:ApplicationFacade = ApplicationFacade.getInstance();
// Send the STARTUP notification
var note:Notification = new Notification( ApplicationFacade.APP_STARTUP, this);
// facade returns NULL meaning that another instance of it was already created

..returns null, because it sees that:
       public static function getInstance(): ApplicationFacade {
            if ( instance == null ) {
instance = new ApplicationFacade( );
            return instance as ApplicationFacade;

...instance is NOT null, and when "return instance as ApplicationFacade", it returns null.

How do I go about this?  Both Main and Introduction trying to access the concrete org.puremvc.patterns.facade.Facade class. 



8  Announcements and General Discussion / Getting Started / When to initialize commands, and question about Notifications on: December 06, 2007, 11:29:04

I have an existing video application that has few distinct peices:

  • the Video Player
  • Channel List
  • Videos

The app loads all its data from a database, which is constantly changing.

Here is a breakdown of some of the events fired off in my application:

start app
load remotingProxy
establish rtmp connection
load channel list (loads channel thumbs, titles, etcs)
load first channel (creates horizontal list of video thumbs offstage, with titles, video frames)
show first channel (list moves on stage)
show first video
load videoplayer (sits ontop of video window, attaches videostream)
vp events (play, pause, stop, seek, mute, volume, fullscreen)
close videostream
next video
prev video
next channel
prev channel

This is just a few pieces of the main functionality. 

First Question:

Do all these get listed in the ApplicationFacade class as notification names?  What if my app was much bigger than this, would I list all 100+ notifications here?  If not, where would I list them? In my existing (very mediochre) architecture, the main pieces of fuctionality all have their own facade which lists notifications specific to that component.  I just need a straight answer, what is best practice for this scenario?

Second Question:

I'm trying to better understand the controller functionality in the PureMVC architecture.  Other than at startup, where and when would I need to register new commands?

Third Question:

In my application, would it be best to have one mediator for a set of components (such as the video boxes)? ... and if not, would I instaniate a new mediator for each videobox component after each one loads?  Same kinda goes for the channel list ...

If I manage to finish this application, I would be more than willing to provide a much simpler version (using xml sheets, and progressive video) as a demo.

I really do appreciate this new framework, and have spread the word to my fellow colleagues.  Thanks much Cliff!

9  Announcements and General Discussion / Getting Started / MacroCommands and Assets on: November 30, 2007, 11:44:23
What would be the best sequence of events for initializing:

Splash.swf (includes loader)

Only the StageAssets are dependant on the proxies.  If I was using the StartupCommand Class:

package com.me.myapp.version1.controller
    import org.puremvc.interfaces.ICommand;
    import org.puremvc.patterns.command.*;
    import com.me.myapp.version1.ApplicationFacade;

    public class StartupCommand extends MacroCommand implements ICommand

        override protected function initializeMacroCommand() : void   

Would the AssetPrepCommand fall under the view anyways?  Just need a little guidance to get me started ...
Pages: [1]