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]
16  Announcements and General Discussion / General Discussion / Re: first project with pureMVC on: January 31, 2008, 12:27:04
This is great!  Just what I needed.  I will be implementing timeouts for my project.  This is beautiful.  Thanks philipSe.
17  Announcements and General Discussion / General Discussion / Flash Website with PureMVC on: November 12, 2007, 01:40:28
Alright, I wanted to share this with you guys.

It's my companys site I'm building with PureMVC.  It's still a very early build but I thought this might be helpful to some people out there like me. 

When I started with this framework about 4 weeks ago, I was wondering how I could implement the PureMVC framework in a regular flash website.  This is what I've come up with so far.

I'll explain just a little bit of what's going on...

I've set up a model class called NavigationProxy that reads an xml of the basic structure of the site your trying to build.  It sets up certain groups that other mediators can register too.  For example, any panel that need to display when the home button is clicked will want to register to the 'home' group.

My StageMediator class is in charge of adding these display objects to the stage.  It's also in charge of making sure that all objects are removed when you want to navigate to another part of the site.

There are other classes in my src files that anyone is welcome to use.  Any view component will want to extend these classes in order to have the easout and easein functionality controlled by labels in the flash document.

I'll be uploading my progress in the next couple of weeks.  Feel free to tear up my code and make it better  :)

My files right now need a lot of work still but I think this is a really good starting point for a "Code Generator  ;D"

You can download the stuff here http://zther.net/zther.zip
18  PureMVC Manifold / Bug Report / Re: TypeError: Error #1006 push is not a function on: November 09, 2007, 10:43:04
Nice to know I wasn't going crazy  :)
19  PureMVC Manifold / Bug Report / [ ODDITY ] TypeError: Error #1006 push is not a function on: November 08, 2007, 06:18:20
Ok, I'm not sure if I'm missing something.

Apparently, if I registerCommand with the string "join" for the first parameter.  I get that error at the top.

As soon as I change it to something else like, "register" it works.

The error leads me to the registerObserver method in the org.puremvc.core.view::View Class.

Is this a reserved word or something?
20  Announcements and General Discussion / General Discussion / Re: first project with pureMVC on: November 08, 2007, 11:03:25
I'm glad I could help in some way. :)
21  Announcements and General Discussion / General Discussion / Re: first project with pureMVC on: October 31, 2007, 02:32:59
I just created this...

I thought this might be a little more reusable then counting.

If someone can advise if it's complying to best practice  :)  I'd like to contribute something to this post.  8)

:
package com.meekgeek.model
{
import flash.utils.Dictionary;

import org.puremvc.interfaces.IProxy;
import org.puremvc.patterns.proxy.Proxy;

import com.meekgeek.ApplicationFacade;

public class StartupMonitorProxy extends Proxy implements IProxy
{
public static const NAME:String = "StartupMonitorProxy";

private var resourceList:Dictionary;

public function StartupMonitorProxy(proxyName:String=null, data:Object=null)
{
super(proxyName, data);
resourceList = new Dictionary();
}

override public function getProxyName():String
{
return StartupMonitorProxy.NAME;
}

public function addResource(name:String):void
{
resourceList[name] = false;
}

public function loadResources():void
{
trace('loading resources');
for(var key:String in resourceList)
{
trace('load resource: '+key);
var proxy:* = facade.retrieveProxy( key ) as Proxy;
proxy.load();
}
}

public function resourceComplete( name:String ):void
{
resourceList[name] = true;
checkResources();
}

private function checkResources():void
{
var resourcesLoaded:Boolean = true;
for(var key:String in resourceList)
{
if(!resourceList[key])
{
resourcesLoaded = false;
break;
}
}
if(resourcesLoaded)this.sendNotification( ApplicationFacade.LOADING_COMPLETE);
}
}
}

It's the first proxy to be registered.  All other proxies that need to be loaded before moving on, will call addResource() which adds them to a list of resources.  Once all proxies have been added, you execute a command to call loadResources() which calls load() on all proxies in the list.  Once the individual proxies complete the load process, they call resourceComplete() to advise StartupMonitorProxy that something has finished loading.  It then checks to see if all proxies are ready.  If all proxies check out, it notifies the framework to move on :)

If this is looking like something that other's can use I can upload the files I'm using.
22  Announcements and General Discussion / General Discussion / Re: first project with pureMVC on: October 31, 2007, 11:35:24
Yeah, I see that, but in the code, ApplicationFacade calls ApplicationStartupCommand which add two sub commands, ModelPrepCommand and ViewPrepCommand.  I can't find where StartupMonitorCommand is used.  Am I downloading a different zip?

Sorry if I'm missing something right in front of my face.  I'm new to this framework.  Heard this was better than cairngorm ;)
23  Announcements and General Discussion / General Discussion / Re: first project with pureMVC on: October 30, 2007, 02:51:56
I have a question about the demo...

Where is com.ugoletti.controller.StartupMonitorCommand implemented?  I can't find it.
24  Announcements and General Discussion / Architecture / Re: Preloading Assets on runtime on: October 30, 2007, 01:37:22
That makes sense, however, in AS3 what would be best practice to "addChild()" after load is complete?

At the moment, My StageMediator listens for "ADD_TO_STAGE" and I pass my viewComponent.  Is this wrong?
25  Announcements and General Discussion / Architecture / Re: Preloading Assets on runtime on: October 28, 2007, 02:04:30
I would like to know an answer to this as well.

In my situation (using flash cs3), it could be a another component on another swf file ( build with pure mvc  ;D).

Seems confusing to me if you treat the information as part of the model layer  ???
Pages: 1 [2]