Page 1 of 1

Support multiple preference files

Posted: Mon Dec 17, 2012 10:42 am
by Didelphodon
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.

Re: Support multiple preference files

Posted: Mon Dec 17, 2012 7:51 pm
by Tenaja
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.