The problem is that every time you do
> <serives:Services id="servicesCore"/>
you are instantiating a ServiceLocator, and as you will see in the
code below, The ServiceLocator validates a static variable to see if
an instance has already been created in its constructor:
// Constructor should be private but current AS3.0 does not allow it
public function ServiceLocator()
{
if ( instance != null )
{
throw new CairngormError(
CairngormMessageCodes.SINGLETON_EXCEPTION, "ServiceLocator" );
}
instance = this;
}
For an alternative to Cairngorm that supports modular applications,
you can have a look to http://code.google.com/p/aconcagua-flex/
Regards,
Andres
--- In [email protected], "ilikeflex" <[EMAIL PROTECTED]> wrote:
>
> Hi
>
> I have shell application (main.mxml) which loaded multiples modules.
> All the modules are mini application which can be run independently.
> Shell application just load these modules depend upon the user
> choices. As soon as i combined all these applications and try to
> access any module i get the error
>
> Error: C0001E: Only one Service Locator instance can be instantiated.
>
> I am not making any call to get the services in the shell application.
> In all the modules i have declared cairngorm controller and cairngorm
> service locator in mxml file like
>
> <control:CoreController id="controllerCore"/>
> <serives:Services id="servicesCore"/>
>
> All the modules have different ids for controller and Service Locator.
> The application runs fine when i run through Flex Builder but when i
> deploy on server i get the error.
>
> I do not know why i am getting this error.
> Any pointers.....
>
> Thanks
> ilikeflex
>