Re: [GD-General] RE: A portable preferences library
Brought to you by:
vexxed72
From: Brian H. <ho...@py...> - 2003-12-05 05:48:40
|
> You need to make your mind up on whether you think prefs files are > movable across architecture or not? Oh, they definitely are. Sharing prefs is something I would hate to rule out. > If they are, then float-format > will kill you, as will endianness in integers. IEEE-754 floats are pretty standard, and my lib handles all the endianess stuff just fine. Of course, for raw binary export, it's up to the application to make sure that it does the right thing if serializing structs (which it shouldn't be doing, but hey, I can't control the app). > Personally, I think that floating point *prefs* are going to be > pretty damn weird to start with, and you need to keep in mind that > that information is entered either as text (ie, in an EDIT > control), or by tweaking a scrollbar. In either case, the user > can't really complain about that last bit that might go wrong in > the ASCII->FLOAT conversion. Agreed, that just happened to be the first example I could think of. > I'm surprised that no-one has said "use XML format please" - its > not that painful, given that you'll have a fairly limited schema to > implement. Sure, it's not that bad, but it's also a lot of overhead for not much in return. Nothing beats Windows-style INI files for parsing simplicity goodness. =3D) Brian |