It would be really cool if the preference library would follow the conventions/strategy in other libraries (ie. file library) to return an unique handle/pointer to use in following instructions.
Having only 1 preference file accessible at one time is sometimes (in my cases often) not sufficient. Especially when you do include libraries and want to store/load states within a procedure you cannot rely on that the "upper" code has not already opened a preference file.
Support multiple preference files
- Didelphodon
- PureBasic Expert
- Posts: 450
- Joined: Sat Dec 18, 2004 11:56 am
- Location: Vienna - Austria
- Contact:
Support multiple preference files
Go, tell it on the mountains.
Re: Support multiple preference files
In the meantime, always close the pref file after you have completed your immediate need of reading or writing to it, and you will not have issues. It is not good practice to leave a file open longer than necessary. You should close it as soon as "immediate" access has concluded.