Image Caching / defaultfolder weirdness

prothero at prothero at
Fri May 5 10:27:50 EDT 2017

Can you use the specialfolderpath function to get the correct locations of your resources on various os's?

William Prothero

> On May 5, 2017, at 5:33 AM, Phil Jimmieson via use-livecode <use-livecode at> wrote:
> Hi folks,
> I’ve got an application for Mac and PC which has been developed over a number of years and versions of LiveCode and I’m currently trying to build it with LiveCode 8 on MacOS 10.12. 
> A single folder contains both my App and some other folders that contain supporting materials - images etc. In order to use these image resources I use image objects in my app that have relative filenames and in the preopenstack handler of the mainstack I set the defaultfolder to be the folder containing my app and the support folders.  I can work on my app in the IDE (where the LiveCode source file is in the folder rather than a compiled app) and all is fine. Images display properly, text files etc. are all in (relative) place. When I compile the App with LiveCode 8 and put that in the folder with the resources, all of my images are broken. I’m guessing that LiveCode is attempting to load them before the defaultfolder is set correctly and just not finding them (I think the initial value for the defaultfolder in a compiled MacOS app is the location of the binary - which is deep inside the app bundle - not the correct place to look for my support folders).
> Has anyone else seen this and have a solution? Aside from making sure the defaultfolder was correct there was no need to do anything else in LiveCode 7 and below. Am I going to have to go through all of my graphics as the application starts up and replace their filenames with valid absolute paths or something?
> LiveCode 9 has exactly the same issue. 
> --
> Phil Jimmieson  phil at  (UK) 0151 795 4236
> Computer Science Dept., Liverpool University, Ashton Building, Ashton Street
> Liverpool L69 3BX    
> I used to sit on a special medical board... ...but now I use this ointment.
> _______________________________________________
> use-livecode mailing list
> use-livecode at
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:

More information about the Use-livecode mailing list