I have some png files that I use as pictures / icons in my application.
I dragged them into the project from the OS.
However what I actually get is a pointer to these images on disk.
If that folder moves then my project is sort of broken.
Is there a way to make these ‘internal’ or is there a special folder where I can put these resources?
Platform ?
I’m developing a web application (stand alone) that should theoretically run on Windows/Mac and Linux.
but the question is general in nature, I thought.
Which platform m are you developing on as that really does matter
OS X uses alias to track external items like this so they stay connected regardless of where you move the project OR the image itself
Windows has no such thing so if you move the project or image it may well break
Linux is like Windows in this regard
If we use a relative path & you move the project its busted
If we use an absolute path to the image then you move the image its busted
We really can’t do much better than the platform itself can
Personally I tend to put projects in a directory & have a sub directory for images in the project one
Then if I move the project I move the whole dir containing all the resources and code etc
So there is no ‘resource’ folder on a Xojo Project I guess.
You can create it…
No
Put each project in a directory & have a sub directory for images next to your project files
But folks can & do drag in items from all over (including network shares which the next time they open the project they don’t have mounted) & it can cause all sorts of fun
People like that sort of flexibility - but it has its own downsides
As a side issue… If one had say a spread sheet template that you wanted to distribute with your application were would you put it such that the build folder actually had it?
I’d put it in my resources and maybe use a copy file step to put it in the right place when the app was built
Or drag it into the project & then compiling will put it in the right place