Extends

BlitzMax Forums/BlitzMax Beginners Area/Extends

Yue(Posted 2015) [#1]



Hi, I'm trying to understand the heritage and want to know if you can inherit a method or function to serve as a constructor with the same name, only to receive a parameter to set that object is what starts.

In my case, I play to create the window TVentana guy by the name dle constructor method later to create the TTextArea object method called ConstructorTextArea, and I wonder if you can have one inherited method from a parent class to build an object where a parameter is set if you create the vetnana or textarea.

Any suggestions?


grable(Posted 2015) [#2]
So long as the function/method has the same prototype it can be overridden. You can even change the return type if it is a sub-class of its parent.