[openbeos] Re: openbeos Digest V3 #121

  • From: "Michael Phipps" <mphipps1@xxxxxxxxxxxxxxxx>
  • To: openbeos@xxxxxxxxxxxxx
  • Date: Wed, 02 Jul 2003 16:17:21 -0400

>Ingo Weinhold <bonefish@xxxxxxxxxxxxxxx> wrote:
>> I would favor a format like the one François mentioned. Even better 
>> would
>> be something compatible to the driver settings format. E.g. an 
>> extension
>> by optional type annotations. If the type is omitted, `string' is 
>> implied.
>> If given, a basic parser (e.g. in the kernel or boot loader) may
>> nevertheless ignore the typing info, interpreting everything as 
>> strings.
>> This would allow a certain level of interchangability between 
>> BMessages
>> and driver settings strings. In particular for sending messages from 
>> the
>> kernel to userland this format might be used.
>
>Yes, something like this might be nice, although the driver_settings 
>format might be a bit unhandy for some types at the moment (for example 
>BRects), but that could eventually be fixed.


Haven't we had this discussion about half a dozen times? :-)

*PERSONALLY*, I think that flattened BMessages is the way to go.
Now, before you XML folks lose your minds, hear me out.
*IF* BMessages have the capability of being rendered into XML, they become 
human readable.
Making a generic application that allows you to change the values in a BMessage 
is about 3 hours of work.
But.
It is also somewhat a bad idea, as there are no "rules" in such a tool. Let's 
say you have an enumeration in your BMessage.
0,1, 2 all mean something. 27 does not. Someone comes along and changes the 
preferences file.
Both your preferences app and your application need to use some validation code 
to check those values and do "something".
That something could be anything from ignoring the preferences file to using a 
default for that setting.
In any case, you have just put a hammer in the hand of an infant.
The preferences apps exist for a good reason. They are the interface to 
changing those settings.
If you need to change those settings from some other application, the first 
thing I think is "why?". Look at printing. Apps that need to allow people to 
set up printers call the printer preference. Why? Because that is the Right Way.

Remember - our goal is not to be Unix. There doesn't have to be (and shouldn't 
be) a dozen different ways to do the same thing. Nor is choice always good. 
That is one of the reasons that Linux is so unfriendly on the desktop. There 
are too many ways to do the same thing and none of them are simple enough.



Other related posts: