FileDialog: Can I inquire which wildcard was selected by the user?

I have a problem where I want to allow users to input files and I need to select the right input code for the file. Normally its OK to differentiate the different files types on the basis of extensions but sometimes other packages we use output data in different file formats but use the same extension. For instance, many packages output files with .dat extension but the internals of the file are different from application to application. I thought I might be able to get round this by having a wildcard that use the drop down menu to differentiate the file types as

‘SURFER|.dat|TOUGH2|.dat’

where SURFER and TOUGH2 are both programs that output a .dat file with essentially the same data in them but with different internal formats.

My question: is there a way in FileDialog to inquire which of the wildcard filters was selected by the user (i.e. did they select SURFER or did they select TOUGH2) because I clearly can’t use the extension of the selected file to differentiate. I’ve looked in the wxwidgets docs and can’t find anything … so I suspect it can’t be done but I thought I’d check here first before putting up a 2nd dialog when I need clarification of what package generated the file.

You may want to look at the file content to find out.

Karsten

···

On Thu, Mar 27, 2014 at 04:28:41AM -0700, GRW wrote:

My question: is there a way in FileDialog to inquire which of the wildcard
filters was selected by the user (i.e. did they select SURFER or did they
select TOUGH2) because I clearly can't use the extension of the selected
file to differentiate. I've looked in the wxwidgets docs and can't find
anything … so I suspect it can't be done but I thought I'd check here first
before putting up a 2nd dialog when I need clarification of what package
generated the file.

--
GPG key ID E4071346 @ gpg-keyserver.de
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346

phoenix_title FileDialog

GetFilterIndex(self)
Returns the index into the list of filters supplied, optionally, in the wildcard parameter.

Before the dialog is shown, this is the index which will be used when the dialog is first displayed.

After the dialog is shown, this is the index selected by the user.