I have come across another problem with SpecialFolder.ApplicationData. I have just moved back to using my MacBook Pro running OS Monterey version 12.4 after working on my Project for the last month on my old iMac with a big screen running OS Catalina v10.15.7. I need the Project on my laptop as I am going to London for a few weeks. I am using Xojo2022r1.1
The original slight problem I had on the iMac was finding a place to save my files externally and being able to access them - all .txt files - in the Finder. Although I knew they were going in a folder called xojoData in a folder called Application Support inside another folder called Library inside my home folder iMac27, I was never able to see this in the Finder or access it.
No problem, I could find xojoData using the Xojo Command-F find facility and looking for a folder called xojoData. I then created an alias on my desktop so I could access, check and modify the .txt files if I wanted to without doing it through Xojo all the time. I have copied the entire xojoData folder to my laptop ready to put it in the right place on the hard drive.
Of course I could not identify the right folder in the Monterey Finder so I used this code from a method called folderCheck in my Project:
fD = SpecialFolder.ApplicationData
If fD = nil or not fD.exists then
MessageBox("Problem with folderCheck, fD")
end
fE = fD.Child("xojoData")
if fE = nil or not fE.exists then
MessageBox("Problem with folderCheck, fE")
fE.CreateFolder
end
fF = fE.child("crosswords")
if fF = nil or not fF.exists then
MessageBox("Problem with folderCheck, fF")
end
There was no problem with the ApplicationData. The folder xojoData could not be found but was created, then there was a problem with the next folder. I know the xojoData folder was created because I ran the code again and there was no problem until the third folder, crosswords.
Well I suppose I can get round this by importing my whole folder and file structure into Xojo and spitting it out again on my laptop. However, in Monterey, I can’t even find the folder xojoData using the find facility so I can’t access it or its contents any way except via Xojo.
Monterey seems to be preventing me from seeing the Library and the Application Support folders or at least I can see a Library folder inside the Laptop hard drive and it has an Application Support folder in it but that folder has no visible xojoData folder inside it and anyway, it is in the wrong place. From what I know from working on my iMac, the Library folder should be inside my user home folder, with Application Support/xojoData inside that.
Is there some way I can make my file structure visible and accessible via the Finder or via the search facility as I have managed to do on my iMac? Thanks if you can help! Steve