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.