[Gambas-user] Looking for a little help with an app.

Rolf-Werner Eilert eilert-sprachen at ...221...
Tue May 12 16:46:00 CEST 2009


CelticBhoy schrieb:
> I have just one problem with this method of updating the totals, if I delete
> the value contained in one of the valuebox items, I get this error :-
> 
> Type mismatch, wanted number got null instead.

As far as I know: a Gambas feature :-)

If you put an empty string into a Val() function, this is the answer. So 
you will have to check if it's Null first:

IF NOT Null(Val(ValueBox1.Text)) THEN
   x = Val(ValueBox1.Text)
ELSE
   x = 0
END IF

At least this is what I've been doing since Benoit taught me to do so...

Rolf





More information about the User mailing list