[Gambas-user] Removing / Modifying IsXXXX() functions in Gambas3

Ron ron at ...1740...
Tue Nov 30 09:04:58 CET 2010


>>> Mail.module:    IF IsString(Main.GlobalVar["Minute"]) THEN
>>> Main.GlobalVar["Minute"] = Val(Main.GlobalVar["Minute"])
>> Just seems to be checks to see if the variant value from that collection
>> isn't empty, to prevent errors.
> So use 'Not IsNull()' instead.
>

I get when I do  If Not IsNull(Main.GlobalVar["Minute"]) Then ....

Error: Type Mismatch wanted string, got integer.

Main.GlobalVar["Minute"] 's  value is 34

Main.GlobalVar[] is a Collection with Variants , so contains all types 
of values.

Sometimes, (don't know why) Main.GlobalVar["Minute"] contained a string 
so "34" instead of an integer, then further down my program things went 
wrong, so therefor this stupid check and correction posted above was used..

Regards,
Ron_2nd.




More information about the User mailing list