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
16  Announcements and General Discussion / Getting Started / Re: LOADING_COMPLETE: start up manager - but not all loaded 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.
17  Announcements and General Discussion / Getting Started / Re: LOADING_COMPLETE: start up manager - but not all loaded 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();
}
18  Announcements and General Discussion / Getting Started / Re: LOADING_COMPLETE: start up manager - but not all loaded 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.
19  Announcements and General Discussion / Getting Started / LOADING_COMPLETE: start up manager - but not all loaded 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 ...
20  PureMVC Manifold / MultiCore Version / start up manager compile error with multicore on: August 20, 2009, 02:42:26
I cant see that I'm doing anything wrong however the defaultTimeout method throws the compiler

         _monitor.loadResources();
         _monitor.defaultTimeout = 30;

 Error: Access of possibly undefined property defaultTimeout through a reference with static type org.puremvc.as3.multicore.utilities.startupmanager.model:StartupMonitorProxy.

I dont see why unless I have some outdated classes or its multicore ?
21  Announcements and General Discussion / General Discussion / multiton access of application facade. on: August 18, 2009, 03:22:37
facade.retrieveMediator(ApplicationFacade.getInstance( NAME ).startup( this ))

I was told the above is how to access the correct application facade in a multiton however startup doesnt seem to be a valid method for that ?

thanks for help
22  Announcements and General Discussion / Getting Started / Re: multitonKey for this Notifier not yet initialized! on: August 13, 2009, 09:21:56
Wasn't running the command's code within the execute method. Doesnt need a constructor seemingly either.
23  Announcements and General Discussion / Getting Started / Re: multitonKey for this Notifier not yet initialized! on: August 13, 2009, 07:00:10
I'm getting this same error but inside a command class. I cant really understand why the code I inherited is using multicore but it is.

:
public class LoadCommandMessages extends SimpleCommand implements ICommand
{

public function LoadCommandMessages()
{
trace("proxy is "+ facade.retrieveProxy("OdstDataProxy"));
}

}

}
24  Announcements and General Discussion / General Discussion / load order management on: August 03, 2009, 11:42:49
I see a class in a code base I inherited where I would have thought that I can manipulate the load order, at least starting as when things load depends on the size of the resource but every little helps me ??

StartupCommand, is the name of the class. Interestingly this doesnt look like part of the download for the as3 single core, so is this not part of the framework ? And where normally would I order things in loading and can the framework be forced to obey a load order before loading the next resource ?

thanks
25  PureMVC Manifold / Standard Version / getting stage dims from within anywhere on: July 28, 2009, 07:53:10
I cant work out why I get null for the following , ultimately i want to get a stage width

stageMed = ApplicationFacade.getInstance().retrieveMediator(StageMediator.NAME) as StageMediator;


its null so far

26  Announcements and General Discussion / Getting Started / Re: not a known Application Resource Proxy on: July 24, 2009, 06:54:16
Hmmm it didnt like passing an empty note body !

sendLoadedNotification( ApplicationFacade.LANGSWFLOADED, "", NAME );

fixed with ...

sendLoadedNotification( ApplicationFacade.LANGSWFLOADED, NAME, NAME );
27  Announcements and General Discussion / Getting Started / not a known Application Resource Proxy on: July 24, 2009, 06:45:12
I get the error not a known Application Resource Proxy when I try and run my proxy listed below. I can see that I missed anything

:
public class LangSwfProxy extends EntityProxy implements IStartupProxy
{

public static const NAME:String = "langSwfProxy"
//public static const SRNAME:String = "langSwfProxySR";

private var stageMed : StageMediator;
private var flashVar : FlashVarsVo;

public function LangSwfProxy()
{
super(NAME);
}


public function load() :void
{
sendNotification( ApplicationFacade.LANGSWFLOADING);
stageMed = ApplicationFacade.getInstance().retrieveMediator(StageMediator.NAME) as StageMediator;
flashVar = stageMed.flashVars;
//
var mLoader:Loader = new Loader();
//
ExternalInterface.call("console.log", { LangSwfProxy:"URL: " + "assets/swf/" + LangFont.getLoadAssetString(flashVar.getVar("siteId")) } );
//
var mRequest:URLRequest = new URLRequest("assets/swf/"+LangFont.getLoadAssetString(flashVar.getVar("siteId")));
//
mLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler);
mLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgressHandler);
mLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
//
mLoader.load(mRequest);
        }



function onCompleteHandler(loadEvent:Event)
{
sendLoadedNotification( ApplicationFacade.LANGSWFLOADED, "", NAME );
}



private function errorHandler(e:IOErrorEvent):void
{
            sendLoadedNotification( ApplicationFacade.LANGSWFFAILED,"", NAME );
        }



function onProgressHandler(mProgress:ProgressEvent)
{
//
}

}

}

thanks for any ideas...
28  Announcements and General Discussion / Getting Started / Re: Using the ApplicationFacade when sending notifications of events? on: May 01, 2009, 12:13:53
No just that its nice to send some object along with an event I thought that the framework had a system for doing this and I wanted to make sure I am doing things properly.
I see that for a few of the examples a lot of the business logic is handled in the mediators and that the model is doing more higher level business logic. I dont mind this in fact as it represents a real world better. I just have to think of this framework as something new not as MVC and it will become easier I guess.
thanks
29  Announcements and General Discussion / Getting Started / Anatomy of a chain of events on: May 01, 2009, 10:05:09
Just want to see if I have this right from what I can tell.

Objective : have a UI element send data to the model process that data and display a result in the same (or not) UI. Must keep encapsulation.

UIView > dispatchEvent to its Mediator
UIViewMediator > sendNotification(include value object or other data) to a controller (which controller)
UIViewController > sendNotification(include value object or other data) to ModelProxy
ModelProxy > sendNotification(include value object or other data) toModel - do thing and then go all the way back.

I have left out the facade here on purpose as I would like to see how it could be done using that. I think how I have it here is more traditional MVC, with pure I seem to be seeing that I can go straight to the Model with facade ?

thanks for developing this thread...
30  Announcements and General Discussion / Getting Started / Re: Using the ApplicationFacade when sending notifications of events? on: May 01, 2009, 07:19:18
First abuse - Well I tried as it was such a simple application to just create my user intervace and view elements inside the mediator class. Instead I should have a specific view class and do something like this

:
                    var form:Form = new Form( stage );
                    facade.registerMediator(new FormMediator( form ));

in the above we create a distinc view callled Form, the facade is used then to create its mediator.

I cannot now call a sendNotification from the view !and still original question applies.

It seems all the examples use old skool dispatch event to tell the mediator that something happened. Ok so I do that for now. Also a small gotcha in the Mediator you have to have the following or the name of the view wont resolve as you might think...

:
private function get form():Form
        {
            return viewComponent as Form;
        }
Pages: 1 [2] 3