Hi,
I am trying to convert my Windows app to an OS X app.
Could someone please tell me if the following PATH is valid on OS X?
db = new REALSQLDatabase
db.DatabaseFile = GetFolderItem("Support Files").child("IR.db")
Every time I build my app for OS X, the app refuses to start and an error message says that my app cannot be opened due to a problem and that I need to check it is compatible with my version of OS X?
Therefore, I have a feeling the paths to my database files may be wrong.
Does OS X allow an application to access/modify it’s install folder/DMG? A REALSQLDatabase opens the database file for reading and writing. I ask because this:
A) does the above return what you feel the full correct path should be?
B) if db.dadtabasefile nil?
I am assuming the “Support Files” is something you created… and its physical location would change based on a compiled vs debug version… Perhaps you mean to be using an offshoot of the SPECIALFOLDER function?
My app is compiled and being run from the root of a USB stick.
Also in the root of the USB stick is a folder called “Support Files” which contains the native Xojo database files (SQLite) used by my app.
Everything works fine on Windows, but refuses to run on OS X.
If you right-click on your app and click “Show Package Contents” the child “contents” is revealed
Double-click “Contents” the child “MacOS” is revealed
Double-click “MacOS” the child “App.ExecutableFile.” is revealed
… so that is child/child/child
so the file containing your executable is the parent of your app
… so that is App.ExecutableFile.Parent.Parent.Parent.Parent