[Gambas-user] Observations on Message.Warning (1.9.43)

Werner wdahn at ...1000...
Fri Oct 6 06:09:46 CEST 2006


Consider this:

Dim i as Integer
i = Message.Warning ("Are you sure you want to delete all the records in
the database?" , "Cancel" , "Delete")

The first button is apparently the default so if the user just hits
Enter a 1 is returned.
Cancel button returns 1
Delete button returns 2

So far, so good.

But if the user does not click any button and just closes the window by
clicking on the top right close square a 2 is also returned.

How about in this case returning something this is not in the range of
buttons say 0 or -1?


Regards
Werner Dahn





More information about the User mailing list