Trouble with first Windows Build


I have an app that I have built on a Mac and, as far as I have got with it, it runs just as I want it too.

I am creating this app for a club who will be running it on a Windows machine. It doesn’t work, and it doesn’t look right. I do have one line in the code as follows:

cr = EndOfLine.UNIX

Is this a case where I have to have the #Target commands to allow for both the Mac and Windows?

Then I have this line:

dbFile = SpecialFolder.ApplicationData.Child("Poultry_db.sdb")

I thought this would find the Application Data folder regardless of the operating system. On the Mac I have the file in the Application Support Folder (it works). On Windows (which is running under Cross Over) I have it in the Application Data folder (it doesn’t work).

The program does start on Windows, but it doesn’t connect to the database which immediately creates an OutOfBoundsException when I click a button. Also, there is a lot of colour (type, etc) and an image in the Mac version. The Windows version is completely grey, white and black and the image is missing.

I also accept that it is possible that I set up the installation file in InnoSetup incorrectly (especially as it didn’t put the sqlite file in the Application Data folder, I had to put it there myself).

Are there any good tutorials on using the InnoSetup? I sort of feel that is where the trouble lies in regards to the database file. But then there is the colour problem as well.

I am enjoying using Xojo, it is fun. But even though I have done a few “in-house” programs in RealBasic, this is the first time I have attempted to create a Windows app.

  1. What happens if you use just endOfLine and let Xojo resolve the return chars for the platform as it is supposed to do?
  2. See the Xojo LR for the correct path of ApplicationData on windows. what you are using is not the correct location so that’s why your app is not finding. I’m awau from my office and can’t remember the exact path or I would post it here.
  3. there is a known issue with Windows graphics when a app is compiled on Mac using Mavericks. We’re all waiting for a fix from Xojo, Inc.

Thanks for the quick reply Roger. I am glad (and sad) that there is an issue with Windows graphics when compiled on a Mac. I guess I will ignore that problem in the meantime.

I will check the path for the ApplicationData folder on Windows. It will be tomorrow now as I have other things to do at present.

I have to say this is a fantastic Forum with great, helpful members. I can’t think of another forum I have been on where the answers came back so fast, and so patiently with a complete noob.

For info on SpecialFolder see I can’t see what you are doing wrong, but do you instantiate the variable which holds the folderirem with

Dim dbfile as new folderitem


If you get an error then add a breakpoint and check in the debugger if the variables actually have the values you expect. You should also add some error handling - for example check if the dbfile is not nil and does exist before trying to open it (see

P.S. InnoSetup: on Windows the folder is not ApplicationData. See the docs.