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

Can a constructor return Nil?

$
0
0

Hello,

In a plugin, I declare a class. This class has a constructor that creates and initializes a certain number of data structures. Is there a method for returning Nil to Xojo if one of these creations/initializations fails ? Today I’m using a boolean that can be tested in Xojo to find out if the data structures are valid.

If Not myClass.InitOK Then
myClass = Nil
End

7 posts - 5 participants

Read full topic


Viewing all articles
Browse latest Browse all 3762

Trending Articles