Hi Jacque --
My fault for not providing the full snippet, which would've shown that the issue involved a Mac standalone:
Code: Select all
put the effective filename of stack "EAS-SABE" into tStackPath
if the platform = "MacOS" and the environment = "standalone application" then
put char 1 to offset("EAS-SABE.app",tStackPath)-1 of tStackPath into tFolderPath
else -- must be Windows or IDE
set the itemDelimiter to slash
delete last item of tStackPath
put tStackPath into tFolderPath
end if
I'd lifted the original code from the LC tutorial "How can I get the path to the folder a stack file resides in?" It worked just fine through macOS Sierra, but users reported last November that it broke in macOS High Sierra and Mojave. Forum member Hermann recommended a more elegant alternative (line 3 of the above snippet). This did in fact resolve the problem in High Sierra and Mojave.
Hermann had reported that this worked even in Catalina, but a new user running Catalina just complained that it was again broken -- i.e., that the folder enclosing the standalone and its support files (stored in the /Applications folder) could not be found.
I'd jumped initially to the conclusion that this might be due to some change involving Apple's new APFS. There is another possibility, of course, which I can't rule out: namely, that this new problem can be traced to the fact that I'm still developing the app and creating (64-bit) Mac standalones using LC Indy 8.10, simply because LC Indy 9.x does not run on my preferred day-to-day macOS Snow Leopard. (I do have Indy 9.5.1 installed on a partition running macOS Sierra, but I'm aware that once I start modifying the code in LC 9.x, there's no going back.) Perhaps the LC folks already have addressed this issue in testing with newer versions of macOS.
I've just taken a call from my client -- a long-time Windows-centric colleague -- freaked out that some of his grad students here in the U.S. (those with newer Macs running Catalina) are unable to use the program. He expressed buyer's remorse over the fact that I'd persuaded him to make available Mac as well as Windows versions of his app -- without understanding that, apart from the few lines of Mac-specific code illustrated above, the only additional cost incurred was the several minutes needed to create a Mac standalone along with a Windows standalone . (He claims that in his eventual target market -- Latin America and Spain -- the macOS is nearly unknown.)
In order to promise him a simple (albeit, from my perspective, less than ideal) solution, I agreed to embed the 740 audio (.wav) files (totaling 250 MB) into a substack -- thereby obviating the need to identify the path to the program folder. Modifying the code probably requires more work than fixing the original problem, but the client is the boss.
Please educate me if there is better alternative that will work through upcoming changes to the macOS. Thanks!
jeff k