[Gambas-user] File select broken ?
Benoît Minisini
gambas at ...1...
Fri Nov 20 01:04:19 CET 2009
> I have just realized that my old code does not work any more in selecting
> .jpg files.
>
> Now I am using Gambas 2.17 but I do not know which release made it wrong.
>
> Selecting the directory with my .jpg files it appears empty.
>
> I have to select All Graphics .* to see them and then the selection works.
>
> Here is a segment of the code.
>
> Regards
>
> Pino
> -------------------------
> ' Filter for our user file open dialog. All image types supported by Gambas
> PRIVATE FUNCTION FileFilter(OPTIONAL All AS Boolean = FALSE) AS String[]
> DIM filter AS NEW String[]
> IF All THEN
> filter.Add("*.png *.jpeg *.jpg *.bmp *.gif *.xpm")
> filter.Add("All Graphics")
> END IF
> filter.Add("*.png")
> filter.Add("Portable Network Graphics")
> filter.Add("*.jpeg *.jpg")
> filter.Add("Joint Photographic Experts Group")
> filter.Add("*.bmp")
> filter.Add("Windows Bitmap")
> filter.Add("*.gif")
> filter.Add("Graphics Interchange Format")
> filter.Add("*.xpm")
> filter.Add("X PixMap")
> IF All THEN
> filter.Add("*")
> filter.Add("All Files")
> END IF
> RETURN filter
> END
>
Filters must be separated by semicolons, not spaces. Try with semicolons, it
should normally work.
filter.Add("*.jpeg;*.jpg")
Regards,
--
Benoît Minisini
More information about the User
mailing list