[gtkada] undefined behaviour in File_Selector?

I xer-pil at terra.es
Sun May 19 14:34:33 CEST 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Hi all!

When selecting nothing in the File_Selection_Dialog called in this way:

Put_Line
~   ("|"
~    & File_Selection_Dialog(Title => "Abrir Base de Datos") &
~    "|");

it shows:
|/home/sergio/work/|
Which is i was expecting.
But when calling in this other way:

Put_Line
~    ("|"
~     & File_Selection_Dialog(Title => "Abrir Base de Datos",
~                             Must_Exist => True) &
~     "|");

and selecting no file or directory it raises:

raised CONSTRAINT_ERROR : gtkada-file_selection.adb:149

I was expecting it showed by console the same as before, but it doesn't :(

When selecting a file it doesnt breaks, just return file or directory
selected.
The application needs to open an existing file (not a directory), but i
prefer i doesn't breaks when user selects no file (if possible ;-).
Any idea about how?

Thanks in advance

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE855vVZCbKnLn9SKURAmjmAJ9SqnddjRWqGyuM7XNaWyJZY+V5eACg0JAt
k1hVfeVVaueotBx/3ZkMrOQ=
=sOdk
-----END PGP SIGNATURE-----





More information about the gtkada mailing list