Thanks NP,

I learned something new... I had no idea that <app.executableFile> was available. I did stumble upon a solution of sorts. After thinking about it for a while, I realized that <f=GetFolderItem("")> returns the Parent of the Application or Bundle. So if I use <f=GetFolderItem ("").Child("myApp.app").Child("Contents").Child("myFile")>, this will work. This is a poor way to do this though because if the user changes the file name of the bundle it will fail. Your approach also relies on hard coded folderitems but works from the other direction and the likelihood of directories being renamed inside a bundle is minimal at best.

Craig

Subject: Re: Path Inside Application Package
From: Norman Palardy <[EMAIL PROTECTED]>
Date: Mon, 26 Jun 2006 13:06:47 -0600


On Jun 26, 2006, at 12:50 PM, Craig Hoyt wrote:

I've been constructing my current project in PEF and decided to
make a mach-o version too. I've discovered that the mach-o version
is a package (yeah, I know... some of us come to the table later
than others). My project stores a small data file in the same
directory as the application. In the mach-o version I would like to
put this file inside the package. I use f=GetFolderItem("") to
establish the location for this file, how do I modify to reflect a
location inside the package?

If you get app.executableFile that is the location of the actual EXE
that is running
You can use that as the basis of where to locate files

In a package you probably want

        app.executableFile.Parent.Parent.Child("Resources")

If you right click a package you can look at the internals layout of
files and folders by selecting "Show Package Contents"

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to