In the CustomPropertyHostViewMediator sample the view setter only removes listeners if value is null (see code snippet below). Is it possible that both value and _view are both non-null? If so, _view would not have its listeners removed.
In a related question, I've seen the same view set on different mediators. Could anyone provide information on the lifecycle of views and mediators?
/** @private */
public function set view(value:CustomPropertyHostView):void {
if ((value == null) && (_view != null)) {
// Release all listeners when the dispose manager removes the view
_view.getDataButton.removeEventListener(MouseEvent.CLICK, getHostElevationData);
}
_view = value;
if (view != null) {
_view.getDataButton.addEventListener(MouseEvent.CLICK, getHostElevationData);
_view.latitudeInput.text = "0";
_view.longitudeInput.text = "0";
}
}
Thanks,
-Darrell