topical media & game development
[] readme course(s) preface I 1 2 II 3 4 III 5 6 7 IV 8 9 10 V 11 12 afterthought(s) appendix reference(s) example(s) resource(s) _

talk show tell print

professional-flex-code-21-com-wiley-proflex2-chapter21-business-WeatherDelegate.ax

professional-flex-code-21-com-wiley-proflex2-chapter21-business-WeatherDelegate.ax (swf ) [ flash ]


  package com.wiley.proflex2.chapter21.business
  {
          import com.adobe.cairngorm.business.ServiceLocator;
          import mx.utils.ObjectUtil;
          import mx.rpc.IResponder;
          
          public class professional-flex-code-21-com-wiley-proflex2-chapter21-business-WeatherDelegate
          {
                  public function professional-flex-code-21-com-wiley-proflex2-chapter21-business-WeatherDelegate( responder : IResponder )
                  {
                          this.service = ServiceLocator.getInstance().getHTTPService( "weatherService" );
                          this.responder = responder;
                  }
          
                  public function getWeather(locationId:String, unit:String): void
                  {
                          var call : Object = service.send({p: locationId, u: unit});
                          call.addResponder(responder);
                  }
                  
                  private var responder:IResponder;
                  private var service:Object;
          }
  }


(C) A. Eliëns 2/9/2007

You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.