[openbeos] Re: XML & OpenBeOS

  • From: "Mikael J." <tic_khr@xxxxxxxx>
  • To: openbeos@xxxxxxxxxxxxx
  • Date: Sat, 12 Jan 2002 17:47:39 +0100

>
>Seriously. Think about it. Your preferences app (if it is external) 
will need to 
>send your app a message (if it is running) so that you can have live 
preference
>updating. So Be just called archive and wrote the message to disk. That 
is what
>all of the files in ~/config/settings are. There is a tool on BeBits 
(GEB's gadget or
>some such - search for BMessage) that will let you view arbitrary 
BMessages 
>saved to disk by dragging and droping the settings file on the ViewIt 
app. 
>Allowed me to easily reverse engineer most of the screensaver settings.
>
The problem is rather that we want a standardized way to store the 
settings; the format isn't really that important.

The Settings class JBQ wrote worked just like that - a BMessage with 
some extra functions added for easily saving/loading settings files, 
based on the application signature and an optional sub directory.

So - just come up with an API that's *easy* to use (BMessage-style seems 
like a good idea), then worry about the actual implementation.


I've used Python a lot, which comes with quite a few modules for stuff 
like that - might want to take a look at those?


Regards,
--
Mikael J @ http://hem.spray.se/tic_khr


 

Other related posts: