Quantcast
Channel: Xojo Programming Forum - Latest topics
Viewing all articles
Browse latest Browse all 3798

Do `IsA` on a variable that is an array of a class

$
0
0

I can test an object to be of a particular class, even if it’s a subclass:

Var vSubClassObject As cSubClass
If vSubClassObject IsA cSubClass Then
   // Will work
End If

But I can’t check to see if it’s an Array of a subclass…

Var vSubClassArray() As cSubClass
If vSubClassArray IsA cSubClass() Then
   // Will work
End If

This generates an error at compile time.

How can I test this if my array is empty? How can I know which class an array is initialize to contain?

Regards, Antoine

18 posts - 4 participants

Read full topic


Viewing all articles
Browse latest Browse all 3798

Trending Articles