[Gambas-devel] About gambas Dialog

Benoit Minisini gambas at ...1...
Sat Oct 16 17:08:06 CEST 2004


On Tuesday 12 October 2004 20:31, Charlie Reinl wrote:
> Salut Benoit,
>
> two things about the ganbas Dialog:
>
> 1. I don't understand, why, if par example   IF Dialog.OpenFile() THEN
> RETURN What means, if Dialog returns TRUE, then the user has aborted the
> Dialog. Thats not logic for me.

That's logic for me :-)

>
> If there is a result , something is TRUE, if not then it is FALSE.

If there is an error, something is TRUE, if not then it is FALSE :-)

>
> And I think, even If it is hard for us users(lots of code to change), we
> should break with that.
> Because if we have to breake after the 1.0 that will be harder.
>
>   Dialog.Filter = [ ("XTableView as xtv") & " (*.xtv)", ("All files") &
> " (*.*)" ]
>   Dialog.Path = sPath
>   IF Dialog.OpenFile() THEN
>     RETURN
>   ENDIF
>   sPath = Dialog.Path
>

Trust me - You will write smaller and more readable code by always returning a 
non-false value when something that is not expected happens.

> 2. it would be nice ( on Dialog.SaveFile) that  if the user hasn't typed
> the EXTENTION and a Dialog Filter <> * is set, to add the Filter Extention
> to the File

This is a good idea - I note it for the next version.

>
> Amicalement
> Charlie
>
>

Regards,

-- 
Benoit Minisini
mailto:gambas at ...1...




More information about the Devel mailing list