wxMax - wxFileDialog weirdness

BlitzMax Forums/Brucey's Modules/wxMax - wxFileDialog weirdness

kenshin(Posted 2009) [#1]
Okay, I can pull up a wxFileDialog modal window, but there appears to be a problem with it. It does not appear unless Debug mode is off in BMax. No crash or hang, it just doesn't appear. Here's the code I'm using to initiate it:
Local tp_savedialog:wxFileDialog = New wxFileDialog.Create( Null, "Save Layout", tp_path, tp_file, tp_wildcard, ..
wxFD_CHANGE_DIR|wxFD_SAVE|wxFD_OVERWRITE_PROMPT )
Local modal:Int = tp_savedialog.ShowModal()

If I switch Debug mode off, then the wxFileDialog appears and operates as expected.


Retimer(Posted 2009) [#2]
Have you tried, alternatively, wxFileSelector()?

Very ironic you posted this just now as I had the same issue with wxcolourdialog a few minutes ago. It wasn't working at all with or without debug, but once I used the alternative "wxGetColourFromUser" rather then "wxColourDialog.create", it worked fine.

try:

Local tp_savedialog:wxFileSelector= wxFileSelector("Save Layout", tp_path, tp_file,, tp_wildcard, wxFD_CHANGE_DIR | wxFD_SAVE | wxFD_OVERWRITE_PROMPT, Null)


Time


kenshin(Posted 2009) [#3]
Ok, thanks heaps. I tried that and it works great. I was having a weird bug using wxFileDialog() combined with streams, but there's no problem with the wxFileSelector.:)

I had to modify it a little:

Local tp_savedialog_result:String = wxFileSelector( "Save Layout", tp_path, tp_file, tp_extension, tp_wildcard, wxFD_SAVE | wxFD_OVERWRITE_PROMPT, tp_editorwndw )


Debug mode works fine now too.

I wonder if these Dialog problems are to do with Brucey's wrapper or whether it exists in wxWidgets source?


Pete Rigz(Posted 2009) [#4]
I also have problems with the wxfiledialog not opening at all, either in debug or release. I had to revert to the standard blitz filerequester, but I'll give wxfileselector a go, cheers.


Retimer(Posted 2009) [#5]
Yeah, wxfileselector should work. It seems like only the alternatives are working properly. At least tests with wxColourDialog, wxFileDialog and wxTextEntryDialog don't appear to work without using the alternates.

If anyone is running into problems with other dialogs, the dialogs and alternatives are mentioned here:

http://blitzmax.com/Community/posts.php?topic=77457#866689


DavidDC(Posted 2009) [#6]
I also have problems with the wxfiledialog not opening at all, either in debug or release. I had to revert to the standard blitz filerequester, but I'll give wxfileselector a go, cheers.

Me too in windows - OS X seemed fine.

I've switched to wxFileSelector and it works. Thanks for the tip!