I’n .Net, there is a thing called ‘resources’, that are things you can embed in your .exe. That can be a picture, textfile,…
Is there something equivalent in Xojo? I actually need to store a string within the app, that keeps it value after a restart. It cannot be a constant, because it can change. And writing to a file, database, register, preferences is no option. What should I do?
Why not an option ? That is probably the only way you will be able to save a value between launches. Saving a file in SpecialFolder.ApplicationData is the simplest way to do what you want.
Are you saying this can change during program execution then gets written back to the exe ?
Writing to your exe is a non-starter as this is usually flagged as virus like behavior
Old school. Not valid nowadays. Your program can break (fail to rewrite) due to system protection or external antivirus protection. Your embedded resources can be read, but when you need read/write you should export those contents to a proper readable/writable folder on your system as Michael pointed out and read/write from there. Some people ZIP a collection of files and embed the compressed ZIP file in the executable, then unpack those contents in a proper folder on the first run, for example. If you are trying to hide some value, hide it encrypted in one of those external files.