I have two classes, both have a static constructor.
Class MyClass inherits from MyBase class.
This looks like:
class MyBase:
define public static property MyBaseProp as character no-undo
get.
set.
constructor static MyBase ():
message "MyBase constructor" view-as alert-box information buttons ok.
end constructor.
end class.
And:
class MyClass inherits MyBase:
constructor static MyClass ():
message "MyClass constructor" view-as alert-box information buttons ok.
end constructor.
end class.
When I execute ...
MyClass:BaseProperty.
... only the static constructor of MyBase class is executed. How can I enforce that also the static constructor of MyClass is executed? Is that even possible?
Static constructors don’t execute up the hierarchy the way an instance constructor does. Besides which you didn’t even call anything in the child class, you called something in the parent. The parent doesn’t even know that the child class exists.
Static constructors don’t execute up the hierarchy the way an instance constructor does. Besides which you didn’t even call anything in the child class, you called something in the parent. The parent doesn’t even know that the child class exists.