GetFolderItem Mac/PC difference

I’m using the latest Xojo on a Mac creating a cross platform (mac/pc) desktop app. I have a license to build Mac apps, but not PCs (yet). I have a line of code in my app such as this:

f = GetFolderItem(“MyCustomFolder”)

On the Mac: If I create a folder called “MyCustomFolder” and place it in the same directory as my final built application, my program finds the folder without a problem. If I am still developing the app on a Mac, tweak, run, tweak, run, I put “MyCustomFolder” in the same directory as the Xojo project file for this app. This works like a charm too. So, on the Mac, no problem. Everything works as expected.

On the PC: This is where I get a problem. Not yet having a license to build PC apps directly on my Mac, I downloaded Xojo onto the PC, moved over my Xojo development folder for this app onto the PC, and ran the program. Worked fine. BUT…I couldn’t get the “MyCustomFolder” recognized by the app. I tried putting MyCustomFolder in the same directory as the newly built PC app, but no go, or in the same directory as the project file (which worked on the Mac), but that didn’t work either.

Any idea where the problem is? THANKS!

  1. If you are using “the latest Xojo” to build your Mac app, then you also have a license to build a Windows app. That licensing scheme has been in place for a few years.
  2. You should not be putting data folders in the same directory as your app. Use SpecialFolder.ApplicationData.Child(“MyCustomFolder”).Child(“MyFile”) as your location. Xojo will handle it working xPlat.

Re: #2: Thanks Roger. I probably should be doing what you suggest instead. I will investigate that for sure.

Re: #1: WOW! Well, I sure like what you said, but I must have misunderstood you or vice versa. I’ve been with RB/Xojo for years and years, had various licenses over the years. But, currently, my previous licenses have expired, and I sent them $100 for a Mac Desktop license a few months back…which, as I understand it, allows me to BUILD and RELEASE Mac apps only. I can DEVELOP a PC app (on my mac or a pc) but I can’t release it. I thought I could try to develop anything within the development environment (mac, pc, linux, web, ios, etc) but I can only publish a Mac app. I sure hope YOU are right though!

Looking at the Xojo licensing page, I see that there is a Single Platform license. I was not aware such a thing existed. Sorry for the confusion.

Darn! :wink:

Debug apps are built in a separate folder. You need to copy the folder there or use the #debugbuild conditional to look in the parent folder.

Thanks Tim. I’ve already changed things with thanks to Roger using a SpecialFolder variant (Documents in my case), and that works cross platform without a problem, and also without regard to whether the app is running in final version, or debug, development, etc. Thanks for chiming in. Much appreciated.