GLBasic forum

Codesnippets => DD-GUI => Topic started by: MrTAToad on 2010-Jul-10

Title: File dialog
Post by: MrTAToad on 2010-Jul-10
If DDgui_FileDialog finds an empty directory - it doesn't display the usual "..", but it does crash if you click in the window.
Title: Re: File dialog
Post by: Kitty Hello on 2010-Jul-12
What filter string did you use? It worked for me.
Title: Re: File dialog
Post by: MrTAToad on 2010-Jul-12
I was using "*.*"

I think I know why - the directory displayed (Application Data) doesn't actually exist as a proper directory - its a symbolic link, and thus nothing gets displayed when selected...
Title: Re: File dialog
Post by: Kitty Hello on 2010-Jul-12
but... there must be an .. directory. Or that not present then? That would be really bad.
Title: Re: File dialog
Post by: MrTAToad on 2010-Jul-12
There is directory, but as in DOS, it doesn't display anything...  It should be easy enough to deal with - once I've had a look at it :)
Title: Re: File dialog
Post by: MrTAToad on 2010-Jul-12
In order to make sure at least the back symbol is present (there is no point in opening the link to see where the directory) actually goes, it will be worth adding the following code at line 3413 in DDgui_FileDialog% :

Code (glbasic) Select
IF num_dir%=0 AND num_file%=0
DIMPUSH files$[],".."
num_dir%=1
ENDIF


This will let people access the directory, and go back.