Information générale
Catégorie:
Codage, syntaxe et commandes
>I think this is comparable to checking a property on a form that doesn't exist. Vartype tries to find the form first before checking the property, and
>fails if it doesn't find it. On your example it tries finding the array element
>before doing the check on the element.
Could be, but the actual parent of the array is an app object. It is the element that I thought would be type checked.
>Good tip here might be, creating your own function and using the type() or vartype() function in it, it should solve the problem.
>
>FUNCTION checkVAR
>LPARAMETER voVar, lcType
>IF VARTYPE(voVar) = ALLTRIM(UPPER(lcType))
> IF ISNULL(voVar)
> RETURN .F.
> ELSE
> RETURN .T.
> ENDIF
>ELSE
> RETURN .F.
>ENDIF
>
Thanks, but type() is working now.
>Anyway it's probably some kind of notreallythewayitshouldbeism.
I agree. :-)
>
>Greetings,
>Jeroen
Thanks again!
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement