OSLibSupport Choices
David J. Ruck
druck at freeuk.com
Wed Nov 29 20:08:43 GMT 2000
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.
And before anyone says, why dont you write this yourself, I'd love to but
dont have the time. I investigated when I added choices to DiscKnight, but
then realised in many situations the the location of !Boot.Choices may not
be accessible, so it saves inside the application directory in a format
readable by messagetrans as described above.
Cheers
---Dave
--
____________________________________________________________________________
David J. Ruck Phone: +44- (0)7974 108301 Email: druck at freeuk.com
____________________________________________________________________________
More information about the oslib-user
mailing list