digitalmars.D.dwt - User/app preferences api?
- Bill Baxter (12/12) Apr 10 2008 Is there some api in DWT for user preferences or persistent app
- Frank Benoit (5/20) Apr 10 2008 DWT does not have anything for that.
- Bill Baxter (6/27) Apr 10 2008 Ok, if it doesn't do that for me, then I think I'll just cook up my own
Is there some api in DWT for user preferences or persistent app settings? Like something that would use the Windows registry under win32 and ~/.something files on Linux? I was using dfl.registry for this previously. And if not in DWT, maybe someone can recommend a small lib that would take care of this? I just want to avoid re-inventing the wheel of trying to figure out the right platform-specific place to store such stuff and deciding on storage formats etc. I don't care if it doesn't use the Registry on windows, but on Windows it should figure out that files go into %HOME% if it is set and exists and otherwise into c:\documents and settings\username, etc. --bb
Apr 10 2008
Bill Baxter schrieb:Is there some api in DWT for user preferences or persistent app settings? Like something that would use the Windows registry under win32 and ~/.something files on Linux? I was using dfl.registry for this previously. And if not in DWT, maybe someone can recommend a small lib that would take care of this? I just want to avoid re-inventing the wheel of trying to figure out the right platform-specific place to store such stuff and deciding on storage formats etc. I don't care if it doesn't use the Registry on windows, but on Windows it should figure out that files go into %HOME% if it is set and exists and otherwise into c:\documents and settings\username, etc. --bbDWT does not have anything for that. In JFace there is the PreferenceStore and DialogSettings to store stuff in property files or XML files. Both do not store into the windows registry or have code to manage the storage location.
Apr 10 2008
Frank Benoit wrote:Bill Baxter schrieb:Ok, if it doesn't do that for me, then I think I'll just cook up my own thing. Which in fact, I did. Based mostly on cashew.json. It has some holes, but at least it's small code. --bbIs there some api in DWT for user preferences or persistent app settings? Like something that would use the Windows registry under win32 and ~/.something files on Linux? I was using dfl.registry for this previously. And if not in DWT, maybe someone can recommend a small lib that would take care of this? I just want to avoid re-inventing the wheel of trying to figure out the right platform-specific place to store such stuff and deciding on storage formats etc. I don't care if it doesn't use the Registry on windows, but on Windows it should figure out that files go into %HOME% if it is set and exists and otherwise into c:\documents and settings\username, etc. --bbDWT does not have anything for that. In JFace there is the PreferenceStore and DialogSettings to store stuff in property files or XML files. Both do not store into the windows registry or have code to manage the storage location.
Apr 10 2008