But I found it will be called twice upon initiation. Is that by design?Document wrote:Each class may also have a static __New method, which is called immediately after its static variables are initialized (this occurs in the order that classes are defined in the script). This method can be inherited from a base class, and can therefore be used to initialize subclasses. Within static __New, this refers to either the class which defined the method, or a subclass.
Code: Select all
class x
{
static __New(){
MsgBox "in __New"
}
}