Re: [flexcoders] Cairngorm and Service Locators

2008-04-01 Thread Jon Bradley


On Apr 1, 2008, at 9:37 AM, Nicholas Watson wrote:


Within my ServiceLocator.mxml file, I have a listing of HTTPServices.
Each one of them has the URL hard coded in to the file. I would like
to make this a configurable setting, depending on which environment
the app is running off of (dev, testing, production). What is the best
way to accomplish this?



It depends on how modular you want it to be or how you want to  
configure it.


myService = ServiceLocator.getInstance().getService( "loginService" );
myService.url = pathToYourService;

I dynamically modified service details in some of my delegates this  
way to do exactly as you mentioned (dev,test,prod servers).


good luck,

jon



[flexcoders] Cairngorm and Service Locators

2008-04-01 Thread Nicholas Watson
I new to Flex, so please excuse the newbie question.

Within my ServiceLocator.mxml file, I have a listing of HTTPServices.
Each one of them has the URL hard coded in to the file. I would like
to make this a configurable setting, depending on which environment
the app is running off of (dev, testing, production). What is the best
way to accomplish this?

Example of what I am doing:


http://localhost:/rrs/restLogin.htm"; method="POST"
resultFormat="e4x" showBusyCursor="true">