When I open up a FileRequest() with a specified pattern, say "png|jpg|jpeg|iff|pcx|bmp", I get a requester which has each file type listed in a dropdown list separately.
What I would like to have in addition to that (or instead of that, doesn't matter) as the default option, would be the "All Supported Formats" option which would show all allowed file extensions together (instead of having to manually select a type from the dropdown list).
That's normally how other standard file requesters work when browsing for specific file types.
Indeed, that's what the sample "AnimPlayer" actually does as well. However, copying the same code from there behaves differently in my project:
Code: Select all
/* get additional anim file types supported by plugins */
Function p_GetPluginFiletypes()
Local p = GetPlugins()
freqmask$ = "anim|anim5|anim7|anim8|anim8w|anim8l|anim16|anim32|ham6|ham8"
; iterate over all plugins that we have
For Local k = 0 To ListItems(p) - 1
Local ft = p[k].Filetypes
; iterate over all file types that this plugin makes available
For Local i = 0 To ListItems(ft) - 1
; does this plugin support anims? Add its file type to our mask!
If (ft[i].Type = #FILETYPE_ANIM) And (Not (ft[i].Flags & #FILETYPEFLAGS_SAVE))
freqmask$ = freqmask$ .. "|" .. ft[i].extensions
EndIf
Next
Next
EndFunction
Code: Select all
Local files = FileRequest("Select Anim", freqmask$, #REQ_MULTISELECT)
I even tried this:
Code: Select all
freqmask$ = "anim|anim5|anim7|anim8|anim8w|anim8l|anim16|anim32|ham6|ham8"
Local files = FileRequest("Select Anim", freqmask$, #REQ_MULTISELECT)
Did I miss something? Is there a version issue here?
I'm using @VERSION 6,1 vs 5,3 in the example.
I'm also using RapaGUI, but I don't think that matters for the FileRequest().
EDIT: Testing the last 2 lines on a completely empty project, actually gets me the desired result. There's something in my code for sure, but I haven't yet figured out what.