From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,47bc849aad30d586 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-05-31 09:39:22 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!news.net.uni-c.dk!uninett.no!ntnu.no!not-for-mail From: Preben Randhol Newsgroups: comp.lang.ada Subject: Re: A standard package for config files is needed Date: Fri, 31 May 2002 16:39:22 +0000 (UTC) Organization: Norwegian university of science and technology Message-ID: References: <3CF5D7AC.975B0DB3@cs.tu-berlin.de> NNTP-Posting-Host: kiuk0156.chembio.ntnu.no X-Trace: tyfon.itea.ntnu.no 1022863162 29132 129.241.83.82 (31 May 2002 16:39:22 GMT) X-Complaints-To: usenet@itea.ntnu.no NNTP-Posting-Date: Fri, 31 May 2002 16:39:22 +0000 (UTC) User-Agent: slrn/0.9.7.4 (Linux) Xref: archiver1.google.com comp.lang.ada:25096 Date: 2002-05-31T16:39:22+00:00 List-Id: On Thu, 30 May 2002 08:34:33 GMT, tmoran@acm.org wrote: > In a particular Windows program of mine the user can modify the color > settings (via the usual Windows color dialog), and the program will > save his preferences in the registry. This is done with: Can I get a Linux version of this program? > type Shelf_Palettes is record ... > procedure Stash_Palette is new Claw.Registry.Write(Shelf_Palettes); > ... > Stash_Palette(Claw.Registry.HKEY_CURRENT_USER, > "Software\Decision Aids\Shelves", > "Palette", > Saved_Palette); > > That's pretty simple. It appears to me you are suggesting that instead > I should write code to convert every element of Shelf_Palettes to a string > and write it out preceded with some suitable, human understandable, > "name=", and also write code to read such stuff back in, complete with > error handling when the user has botched up that text file. No. The name would of course be Palette like you use for the registry. But I encourage you to use the Windows registry as long as you only care about windows users. Just don't claim that your code is portable because you use Ada. > a tremendous regression and I can't imagine anybody doing it. Why should > the config file be an easily edited ASCII file? Did everyone enjoy > editing .ini files in old Windows so much? How often in current Windows > programs do users modify the config by doing things in the app (like the > color palette above), and how often do Windows users change a > configuration by using regedit? Sorry but I simply don't care for Windows only solutions. Preben