folder location in Mac OS X

hello
I have a question,
When xojo makes build to mac os x where I put my folder which contains my dat files?

my code is like this

  e = GetFolderItem("Libs").Child("messier.dat")
  stream = e.openastextfile

“An exception of class NilObjectException
was not handled” error when I try to run application
from Applications

Thanks,
Rui

Have a look at specialfolder.applicationdata.

On windows and linux just put the file you want to open in the same folder as the executable.
What is the DefaultDir in the package for Mac OS X?

[quote=30861:@Rui Branco]On windows and linux just put the file you want to open in the same folder as the executable.
What is the DefaultDir in the package for Mac OS X?[/quote]

Stuff you drag into your project (like text files) end up in “Resources” and you can access those via:

dim f as folderitem = app.executableFile.parent.parent.child("Resources")

Basically app.executableFile points to the actual unix binary inside the “MacOS” folder so its .parent is “MacOS” and its .parent is “Contents” – and a .child of that is “Resources”.

Whatever file you’re looking for you could then access with f.child("filename.dat") – make sense?