Add CatchPreferences(*Preference,PreferenceSize.i[, Flags])
Add CatchPreferences(*Preference,PreferenceSize.i[, Flags])
Add CatchPreferences(*Preference,PreferenceSize.i[, Flags])
Re: Add CatchPreferences(*Preference,PreferenceSize.i[, Flags])
+1
being able to load inis from memory was something I've actually needed before, and saving a temporary file and quickly deleting is not very convenient.
being able to load inis from memory was something I've actually needed before, and saving a temporary file and quickly deleting is not very convenient.
Re: Add CatchPreferences(*Preference,PreferenceSize.i[, Flags])
+1, needed this in my project today.
Re: Add CatchPreferences(*Preference,PreferenceSize.i[, Flags])
-1
Makes no sense, because you cannot write prefs into the executable.
You can also read the data cleanly from a DataSection.
Makes no sense, because you cannot write prefs into the executable.
You can also read the data cleanly from a DataSection.
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
-
- Addict
- Posts: 1520
- Joined: Wed Nov 12, 2008 5:01 pm
- Location: Russia
Re: Add CatchPreferences(*Preference,PreferenceSize.i[, Flags])
It makes sense. PB can only read/save in UTF-8.
You can load an ini file in a different encoding (ascii, utf-16) into memory using functions from the "File" library and use CatchPreferences().
Re: Add CatchPreferences(*Preference,PreferenceSize.i[, Flags])
I don't get what y'all are talking about.
If I want to include an ini file into my executable with includeBinary, just like I would include a json file, or an xml file, and I could CatchJson/CatchXml, or even, heck, ParseJson/ParseXml, why shouldn't I be able to CatchPreferences and ParsePreferences?
Or not even only for reading from executable, but what about reading/parsing it from a memory buffer downloaded with network lib, or http lib, or a string made up on the fly, or many other cases where needing to write to a (temporary) file is not ideal at all.
If I want to include an ini file into my executable with includeBinary, just like I would include a json file, or an xml file, and I could CatchJson/CatchXml, or even, heck, ParseJson/ParseXml, why shouldn't I be able to CatchPreferences and ParsePreferences?

Or not even only for reading from executable, but what about reading/parsing it from a memory buffer downloaded with network lib, or http lib, or a string made up on the fly, or many other cases where needing to write to a (temporary) file is not ideal at all.
Re: Add CatchPreferences(*Preference,PreferenceSize.i[, Flags])
All functions that write into/read from files should be doable in memore too. Including, imho, SVGVectorOut() (why do I necessarily have to write it into a file?).
Good morning, that's a nice tnetennba!
PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD