Re: [AD] Contibution: file_select_ex() |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Pavlos <gtoub@xxxxxxxxxx> writes:
> This is a very little piece of code that adds a new function,
> file_select_ex(). The difference between this and file_select() is that
> this one takes 2 additional parameters, a callback function and a
> parameter for the user.
What do you anticipate wanting to do with this callback, other than your
example of leaving out readonly files? I agree that this is a useful ability
to have, but I think it could be implemented more neatly by adding some
command sequences to the existing ext parameter, which would indicate what
file attributes to include. Perhaps say that if one of the file extension
fields begins with a + or - character, it will be interpreted as a
permissions mask, where -x indicates to leave out any files with that
attribute set, and +x indicates to include only files with that attribute
(the attributes would be something along the lines of r=FA_RDONLY,
h=FA_HIDDEN, d=FA_DIREC). So for example an ext string of "PCX;BMP;-r" would
list only the PCX or BMP files that weren't readonly.
Would this fit whatever you are wanting to do?
--
Shawn Hargreaves - shawn@xxxxxxxxxx - http://www.talula.demon.co.uk/
"A binary is barely software: it's more like hardware on a floppy disk."