Skip to content

FileDialog filter inconsistency #1945

@ACrazyTown

Description

@ACrazyTown

Originally reported on the OpenFL discord.

The documentation for the filter argument in FileDialog.save() says:

A filter to use when browsing. Asterisks are treated as wildcards. For example, "*.jpg" will match any file ending in .jpg. Used only if targeting deskop.

My understanding is that I should pass in something like *.png to show just PNG files, but doing that seems to not be right (at least on Windows) and it tries to browse for files that end in *.*.png. I have to pass in png to get the desired results.

It was later determined that FileDialog.cpp adds the *. prefix automatically:

std::wstring temp (L"*.");
const wchar_t* filters[] = { filter ? (temp + *filter).c_str () : NULL };

Is this a mistake in the docs or a bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions