Quantcast
Channel: VMware Communities : Discussion List - vSphere Client SDK
Viewing all articles
Browse latest Browse all 2218

Mediator view setter

$
0
0



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



Viewing all articles
Browse latest Browse all 2218

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>