I'm having a hard time learning Cairngorm, but I'm determined to
figure it out!!  My current problem is with my HTTPService.  In my
Delegate, I'm calling the service like this:

public class ContactListDelegate
{
  private var responder : IResponder;
  private var service : Object;
         
  public function ContactListDelegate(responder:IResponder)
  {
    this.service =
ServiceLocator.getInstance().getHTTPService("ListContactsHS") as
HTTPService;
    this.responder = responder
  }

  public function list():void
  {
    var token : AsyncToken = service.list();
    token.resultHandler = responder.result;
    token.faultHandler = responder.fault;
  }
                
  public function listResult():void 
  {
    responder.result(responder);
  }
}

and then in my services.mxml i have this:

<mx:HTTPService id="ListContactsHS"
url="http://localhost:3004/webservice/list"; 
useProxy="false" 
method="GET" 
makeObjectsBindable="false" 
result="event.token.resultHandler(event)" 
fault="event.token.resultHandler(event)" />

(the service is written in Rails and on the local machine)

When I call the event to get the data from service though, I get this
error:

Error: C0008E: HTTPService not found for ListContactsHS
        at com.adobe.cairngorm.business::HTTPServices/getService()
        at com.adobe.cairngorm.business::ServiceLocator/getHTTPService()
        at com.adamhegedus.contactmanager.business::ContactListDelegate$iinit()
        at
com.adamhegedus.contactmanager.command::GetContactListCommand/execute()
        at
com.adobe.cairngorm.control::FrontController/com.adobe.cairngorm.control:FrontController::executeCommand()
        at
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at com.adobe.cairngorm.control::CairngormEventDispatcher/dispatchEvent()
        at 
com.adamhegedus.contactmanager.view.screens::ContactManager/initFunc()
        at
com.adamhegedus.contactmanager.view.screens::ContactManager/___VBox1_creationComplete()
        at
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at mx.core::UIComponent/dispatchEvent()
        at mx.core::UIComponent/set initialized()
        at mx.managers::LayoutManager/::doPhasedInstantiation()
        at Function/http://adobe.com/AS3/2006/builtin::apply()
        at mx.core::UIComponent/::callLaterDispatcher2()
        at mx.core::UIComponent/::callLaterDispatcher()

I looked through a bunch of samples, but I can't get passed this
one... Anyone have any suggestions?

Thanks,
Adam


Reply via email to