[Gambas-user] InputBox: Cancel pressed

Colin Clark cclark at ...1783...
Sat Nov 17 18:43:51 CET 2007


Hello Benoit et al

When using the InputBox I need to differentiate between when Cancel is
pressed and when the inputbox is deliberately left blank and OK pressed.
Because a string is returned, I can find no way to do that.

So I have solved my problem by changing my local copies of the InputBox
class to return a Variant rather than a String. Now when Cancel is pressed I
get FALSE returned, and I can check for that with:

IF NOT IsBoolean(vReturn) THEN 

I do hope Gambas does not follow Microsoft's lead and decide that variants
are bad for us and must be eliminated... :)


Colin Clark..

-- 
View this message in context: http://www.nabble.com/InputBox%3A-Cancel-pressed-tf4827362.html#a13811494
Sent from the gambas-user mailing list archive at Nabble.com.





More information about the User mailing list