Hey guys,
I’m new to Flex and Cairngorm.While I’m using ServiceLocator,I do run into the problem: Error: C0001E: Only one ServiceLocator instance can be instantiated.
My Code is like this:
In Serives.mxml:
<cairngorm:ServiceLocator xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:cairngorm="com.adobe.cairngorm.business.*">
<mx:HTTPService id="statistServ"
url="rooms.xml"
showBusyCursor="true"
method="POST"
resultFormat="array"/>
In Delegate.as,I have snippets:
this.service = ServiceLocator.getInstance().getHTTPService(”statistServ”);
In Main.xml,snippets like:
<business:Service id="service" />
this wonderful little Error message pops up the minute I load a second instance of some module which requires httpservice.
Is there any way to resolve this problem without switching to another Framework?
Best Wishes,
Shuo from China