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 / Fabrication / Multicore and multiple instances of a mediator on: April 18, 2009, 05:14:42
EDIT: Solving the problem by moving to an swf module based approach as it seems to be the way go to if Fabrication is used. And this approach is looking good so far, the MDI stuff is not quite there yet but it will do for this project. The original approach below was not successful.



I have this problem in AS3 Multicore:

I am implementing a webstore backend using an MDI approach (Flexlib MDI manager). No problems there, I have a MDICanvas workarea and from the menu I can create and add an MDI child windows onto it.

Oh, and I am using Fabrication as well.

As an example I have an ArtistListPanel component that simply lists all artists. It makes use of ArtistsProxy and uses ArtistsListMediator to interact with the rest of the system. When I open the first window there are simply no problems. Works like a champ. The mediator registers an instance of ArtistsProxy, fetches a list of data and lets me update the database as well. Beautiful.

The component is created and registered from the MainDisplayMediator respondTo<xxx> a bit like this:

:
public function respondToViewArtistList():void {
  var aPanel: ArtistListPanel = new ArtistListPanel();
  var alm: ArtistListMediator = new ArtistListMediator(aPanel);
  registerMediator(alm);
  mainDisplay.windowManager.add(aPanel); // add to MDI workarea
}

I register the ArtistsProxy in the ArtistListMediator onRegister() method and I presumed that the proxy might be there after the registration or possibly re-creatable in the following instances. However, after the first registration the onRegister() is not called again so I had to write a getProxy() method that sets the proxy. It works in the first instance.

The problem is that I cannot make more than one instance of the mediator work. I get once again the infamous "Multiton key" error message when retrieving the proxy. Once an instance of a mediator has been registered something goes wrong with the next instance(s). Is there an easy way of overcoming this problem. I feel like total moron (which is very possibly well justified).

Other than that the system looks very, very promising indeed.
2  PureMVC Manifold / MultiCore Version / Re: Events on GWT on: February 11, 2009, 08:04:18
...when he gets back from holiday.

Ok, thanks, Cliff. I will try to find the repository and download the latest version.

Looking forward to Anthony coming back :)

Edit: found the repository - always forget where it is in the google code sites!

Markku
3  PureMVC Manifold / MultiCore Version / Re: Events on GWT on: February 11, 2009, 04:54:51
Hello,

This port is just getting off the ground which is why its still marked as in beta.

Does the google code site contain the latest version (dated Septemper) ? I noticed that the demo and the library are not compatible, at least and it takes an awful lot of development time to try to fix the differences.



Markku
Pages: [1]