OSLibSupport Choices
Tony van der Hoff
OSLib at mk-net.demon.co.uk
Thu Nov 30 09:40:40 GMT 2000
On Wed, 29 Nov 2000, at 20:08:43, David J. Ruck <druck at freeuk.com> wrote
on the subject "OSLibSupport Choices":
>Hi,
>
>if anyone has any spare time and would like to look at areas of OSLibSupport
>for improvements, I'd suggest the choices functions.
>
>It isn't very good at the moment. The method for working out which directory
>to use is wrong as it uses the contents of a single varible Appname$Choices
>to determine the location. This cannot be set to used to access the correct
>directories as Choices:Appname... should be used for reading, and
><Choices$Write>.Appname... for writing.
>
>Its main problem is that it opens and closes the file around each read/write
>operation, making it terminally slow use for a number of choices varibales.
>There should be Choices_Open() and Choices_Close() to bracket operations.
>
>I dont really see why it has to use its own file format either. Surely the
>format is very close to that used by messagetrans. If the choices writing
>routines are modified to output in this format, the reading functions can
>be replaced with calls to messagetrans, once the filename has been
>determined.
>
Yep, I agree, it's (a bit) crap. I've been expecting this EMail ever
since I included the module in OSLibSupport ;-)
It's one of mine, so I guess I'll eventually fix it. The reason it works
the way it does is because I originally wrote it when porting an app
from another fine <spit> OS, and before I was aware of the correct
Choices protocol, so it has more roots in WinAPI than in RISC OS.
Given that it doesn't conform to the Choices protocol, it can be
considered to be bugged; even so, backwards compatibility will be an
issue. I don't think it involves a lot of work, and (at first sight) I
like your MessageTrans idea, so one day... ;-)
--
Tony van der Hoff | mailto:OSLib at mk-net.demon.co.uk
Buckinghamshire, England | http://www.mk-net.demon.co.uk/oslib/
----------------------------------------------------------------
More information about the oslib-user
mailing list