Select to view content in your preferred language

Edit config file while using the flex viewer source in flash builder?

630
7
11-29-2011 11:53 AM
MartynSmith
Emerging Contributor
I dont know if this is a silly question or not, but I have loaded the flex viewer source into flash builder, and working on some modifications.  I'm wondering if its possible to replace the config.xml that I have already modified for the compiled version of the flex viewer with the config.xml I see in the flex viewer source.  I tried copying my old version in and I'm getting some kind of Java error.  Same question for all of my widget config xml's.

If this isn't possible, whats the standard protocol if you want to edit the source of the flex viewer? Recompile after edits to source, then copy your edited config.xml and widget configuration xmls back into your newly compiled project?

Just trying to establish a workflow, any help is appreciated.
Tags (2)
0 Kudos
7 Replies
RobertScheitlin__GISP
MVP Emeritus
Martyn,

   Once you have made changes to XML files or modified MXML code and want to get your changes out to your production server then you will need to go to the Project menu and choose Export Release Build... then copy the contents of the bin-release folder to your production server.
0 Kudos
MartynSmith
Emerging Contributor
Thanks Robert.  What is the difference between "running" (with green arrow) the souce in flash builder, and doing "export release build"?  They seem to do the same thing
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Martyn,

  "export release build" is actually removing all the debug stuff and building release ready swfs for the mxml files that are set as modules and adding them to the bin-release folder and not the bin-debug folder. All the play button does is compiles the swfs in the bin-debug folder and launches the index.html in a browser.
0 Kudos
MartynSmith
Emerging Contributor
Hmm... when I do a "run" (build path set to IIS server wwwroot subfolder) the output flex viewer app runs fine.  I did an "export release build" (to a different folder on IIS server) and now I'm getting an "error 2036".   The map loads, but I'm not getting any widgets to load.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Martyn,

   Your setup works but is not best practice.  Your Output folder URL should point to a virtual directory like:

http://gislap134/FlexViewer2.4/ which as stated is a virtual directory setup in IIS to point to the physical path of the bin-debug folder of your flex project (i.e. C:\Flash Builder 4.5.1\FlexViewer2.4\bin-debug). All of this is on the development machine and then when you are ready to deploy to the production machine then you do a export release build and copy the contents of the bin-release to the production servers virtual directory for your app. Make sense?
0 Kudos
MartynSmith
Emerging Contributor
Martyn,

   Your setup works but is not best practice.  Your Output folder URL should point to a virtual directory like:

http://gislap134/FlexViewer2.4/ which as stated is a virtual directory setup in IIS to point to the physical path of the bin-debug folder of your flex project (i.e. C:\Flash Builder 4.5.1\FlexViewer2.4\bin-debug). All of this is on the development machine and then when you are ready to deploy to the production machine then you do a export release build and copy the contents of the bin-release to the production servers virtual directory for your app. Make sense?


I see.. that does make sense.  I will work on changing my setup.  Thanks for the tip on this.  This doesn't answer my question though of when I exported a release build and copied it over, I'm getting an error #2036 and no widgets loading.......?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Martyn,

    Did you copy absolutely every file in the bin-release folder (not the folder itself) over to the new virtual directrory and is that virtual directory setup as an application is IIS?
0 Kudos