diff --git a/project/bin/flight-framework.swc b/project/bin/flight-framework.swc index a2fc5c7..b720fc3 100644 Binary files a/project/bin/flight-framework.swc and b/project/bin/flight-framework.swc differ diff --git a/project/src/flight/view/Mediator.as b/project/src/flight/view/Mediator.as index e2fde23..cfdc8fc 100644 --- a/project/src/flight/view/Mediator.as +++ b/project/src/flight/view/Mediator.as @@ -34,9 +34,9 @@ package flight.view Bind.addBinding(this, target, this, source, twoWay); } - protected function bindPropertyListener(target:String, listener:Function):void + protected function bindPropertyListener(source:String, listener:Function):void { - Bind.addListener(listener, this, target); + Bind.addListener(listener, this, source); } protected function bindEventListener(type:String, target:String, listener:Function, @@ -47,7 +47,7 @@ package flight.view - // parses [Binding(target="target.path")] metadata + // parses [Binding(source="source.path")] metadata public static function describeBindings(mediator:Mediator):void { var desc:XMLList = Type.describeProperties(mediator, "Binding"); @@ -66,7 +66,7 @@ package flight.view } } - // parses [PropertyListener(target="target.path)] metadata + // parses [PropertyListener(source="source.path)] metadata public static function describePropertyListeners(mediator:Mediator):void { var desc:XMLList = Type.describeMethods(mediator, "PropertyListener"); @@ -99,7 +99,6 @@ package flight.view tag.arg.(@key == "type").@value : tag.arg.@value; var targ:String = tag.arg.(@key == "target").@value; - trace("Methods", mediator[meth.@name], ":", mediator[String(meth.@name)]); Bind.bindEventListener(type, mediator[meth.@name], mediator, targ); } } diff --git a/project/src/flight/view/MediatorMap.as b/project/src/flight/view/MediatorMap.as index bee6d92..ace4e15 100644 --- a/project/src/flight/view/MediatorMap.as +++ b/project/src/flight/view/MediatorMap.as @@ -18,7 +18,13 @@ package flight.view public class MediatorMap implements IMXMLObject { protected var mapping:Dictionary = new Dictionary(); - protected var initializedViews:Dictionary = new Dictionary(true); + protected static var initializedViews:Dictionary = new Dictionary(true); + + + public static function releaseView(view:DisplayObject):void + { + delete initializedViews[view]; + } /** @@ -91,6 +97,7 @@ package flight.view // allow the view to be injected into the mediator Injector.provideInjection(view, view); Injector.inject(mediator, view); + Injector.removeInjection(view, view); return mediator; } }