Okay... I actually found what seems to be a good way of dealing with this.
var dbFileName:String = "Faces.db"; dataFile:File = File.applicationDirectory.resolvePath(dbFileName); Returns the correct directory when the app is being run inside FB3, AND when the app gets installed. This is precisely what I was looking for. I just had to hack and hack to find it. Is there any reason not to use this method? To address your response, we actually host our own subversion repository, we just don't have one set up for Flex projects yet. We're a little ahead of our admin. Good points about the db location. I agree fully and will adjust code to address that. This AIR app is a stand-alone dealio, just an emplyee directory. Thanks for all of your time Jeffry, I really appreciate it. I hope I didn't come across as rude, I'm just frustrated at the learning curve. I feel confident that with the stuff I'm learning on this project I'll be in good shape for the rest of my Flex career. andy -----Original Message----- From: Jeffry Houser [mailto:[EMAIL PROTECTED] Sent: Friday, February 15, 2008 1:43 PM To: Flex Subject: Re: Relative file paths for AIR app dev Andy Matthews wrote: > Okay... > > So the things I took from this email: > > 1) A single codebase in a central location is not the best idea. > We don't yet have subversion set up for Flex/AIR projects so this is > the only > way for us to easily share code and keep it up to date. I whole-heartedly disagree with this. A single code base in a central location is a fantastic idea. And I strongly recommend that location should be a version control repository of some sort. There are a few vendors that you can outsource Source Control hosting too. They'll have you set up much quicker than doing it yourself. > 2) All paths should be abstracted into an external file for ease of > updating. > If path's change, changing the XML file is all that is required to > update > the entire app. Basic principle of encapsulation, design patterns, etc.. is "separate out what changes." I don't have an inherent problem with separating out the paths. However, how often will the location of your database be changing? Rarely! It sounds like you are separating them out not for encapsulation purposes, but to deal with inconsistent development environments paired against a different development environment. It'll probably work for now, but I wouldn't not approach it as a long term fix. > 3) All files needed to run the actual application get stored in the actual > install folder. > By default this is C:\Program Files\<appname>, but the user can > select > any other location. Regardless of where the app is installed, AIR > has a single > variable which contains the system path to that folder. In most cases, this is true. However if your AIR app is just one piece of a larger application built with its own separate modules, technology, and install process it may not be that simple. -- Jeffry Houser Flex, ColdFusion, AIR AIM: Reboog711 | Phone: 1-203-379-0773 -- Adobe Community Expert <http://www.adobe.com/communities/experts/members/JeffryHouser.html> My Company: <http://www.dot-com-it.com> My Podcast: <http://www.theflexshow.com> My Blog: <http://www.jeffryhouser.com> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/Flex/message.cfm/messageid:4964 Subscription: http://www.houseoffusion.com/groups/Flex/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.37
