Over 10 years of community discussion and knowledge are maintained here as a read-only archive.
protected function onPluginCreated (event:PluginEvent) : void { event.plugin.defaultRouteAddress = applicationAddress; event.plugin.router = applicationRouter;}
if (to != "*" && !(new RegExp("\/INPUT").test(to)) { to += "/INPUT";}
Well spotted. Some of the internal piping is showing there. I think I need to add a check in the RouteNotificationCommand. Something like,: if (to != "*" && !(new RegExp("\/INPUT").test(to)) { to += "/INPUT";}I will verify everything works and check this in tomorrow. Please use the explicit /INPUT for the moment.peace,darshan
[Event(type="org.puremvc.as3.multicore.utilities.fabrication.events.FabricatorEvent", name="fabricationCreated")][Event(type="org.puremvc.as3.multicore.utilities.fabrication.events.FabricatorEvent", name="fabricationRemoved")]
I've been busy refactoring some of my own code and finally everything is working again with 0.41 so that's quite a relief.
One question I have so far is about the new FabricationProxy.I have several modules who's proxy extend the same base proxy, named "DataProxy". When they extend "DataProxy", they don't change the ProxyName because I wanted them to share a couple of Commands which fill the "DataProxy"....So my question is, why does the notificationname get changed when the registered proxyname is not same as the classname?
public function respondToModule1Proxy(note:INotification):void {}// andpublic function respondToModule2Proxy(note:INotification):void {}
override public function qualifyNotificationInterests():Object { return {dataSet : "Module1Proxy"};}public function respondToDataSet(note:INotification):void {}
override public function getNotificationName(note:String):String { return note;};
Here are some other small comments, but nothing really big so far.A small addition to the FlexModule class is to add some event metadata
Although I've seen a "removeEventListener" for every "addEventlistener", another addition I've made myself is to add "false, 0, true" to every addEventListener call to make sure those references won't cause any memoryproblems... (yes I know, not really necessary)
Jason,I have fixed the routeNotification issue you encountered earlier. You can now use module.moduleAddress directly in the to, or ModuleName/InstanceName without the /INPUT.
else if (to is String && !allInstanceRegExp.test(to as String) && !ModuleAddress.inputSuffixRegExp.test(to as String)) { to = (to as String) + ModuleAddress.INPUT_SUFFIX;
} else if (to is String && !allInstanceRegExp.test(to as String) && !ModuleAddress.inputSuffixRegExp.test(to as String) && to != "*") {
/** * Copyright (C) 2008 Darshan Sawardekar. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.puremvc.as3.multicore.utilities.fabrication.core { import org.puremvc.as3.multicore.core.View; import org.puremvc.as3.multicore.interfaces.IMediator; import org.puremvc.as3.multicore.utilities.fabrication.interfaces.IDisposable; /** * FabricationView is the custom view used by fabrication. * It allows for the disposal of all currently registered mediators * at once. * @author Jason MacDonald (Jason.MacDonald@vfmii.com) */ public class FabricationView extends View implements IDisposable { /** * Creates and returns the multiton instance of the view for * the specified multiton key. * * @param key The multiton key whose view is to be retrieved. */ static public function getInstance(key:String):FabricationView { trace(instanceMap[key]); if (instanceMap[key] == null) { instanceMap[key] = new FabricationView(key); } return instanceMap[key] as FabricationView; } public function FabricationView(key:String) { super(key); } /** * @see org.puremvc.as3.multicore.utilities.fabrication.interfaces.IDisposable#dispose() */ public function dispose():void { for each(var mediator:IMediator in mediatorMap) { if (mediator is IDisposable) { IDisposable(mediator).dispose(); } // check if mediator still exists or it was removed in the dispose call if (hasMediator(mediator.getMediatorName())) { // removing the mediator also removes it's observerMap references, good to call removeMediator(mediator.getMediatorName()); } } instanceMap[multitonKey] = null; } }}
override protected function initializeController():void { view = FabricationView.getInstance( multitonKey ); }