Changing which Config.XML is used when running in IDE

493
4
07-01-2010 07:37 AM
MichaelBartlett
New Contributor III
I understand from the URL you can change which config.xml you use by adding this parameter at end of URL.

?Config=config-all.xml

But can I set this up in the Flash Builder 4 IDE so that it runs the desired config.xml when I click the green Run button?
Tags (2)
0 Kudos
4 Replies
RobertScheitlin__GISP
MVP Emeritus
Michael,

  Sure, the process is not very hard just follow these steps:

1. Open the FlexViewers Project properties (right click FlexViewer in the package explorer window and choose properties).

2. Switch to the Rub/Debug Settings page

3. Select the launch configuration in the window (mine is index (2)) and click the edit button

4. Down in the url or path to launch uncheck Use default and add your config parameter there.

5. Apply/Ok that dialog and you are good to go.
0 Kudos
BjornSvensson
Esri Regular Contributor
Robert's suggestion is the best answer for the question, but I just wanted to mention that you can also change the name of the default configuration file from "config.xml" to whatever you want.  Go to the ViewerContainer.mxml in src\com\esri\viewer\ and change this line:

public static const DEFAULT_CONFIG_FILE:String              = "config-mydefault.xml";
0 Kudos
MichaelBartlett
New Contributor III
Bjorn & Robert.

Thank you both for the information.

Helped out a lot.
0 Kudos
MarkHanway1
New Contributor
I updated my Run/Debug settings to include a different config however I get a Launch Failed error where the config file is not found during a debug run.  If I change the config file in the URL path where I have my live site I can change my config.  I wanted to know if anyone is having issues changing the config file during a debug or Run Index? 

Thanks,

Mark
0 Kudos