Inherited methods
BlitzMax Forums/BlitzMax Programming/Inherited methods
| ||
when you inherit a method in a type, you can then use that in the child type, but if you override the method it will no longer run the code in the previous method. Is there any way to override the method, run the inheritied method's code AND your new code? i.e. in Delphi you do procedure DoSomething(X:Integer, Y:Integer); override; begin inherited; //run inherited method's code //do something else here end; |
| ||
Yeah, you have to use SuperMethod DoSomething(P_x%, P_Y%) Super.DoSomething(P_x%, P_y%) ' Do something else... End Method |
| ||
*doh* I forgot all about super. thanks :) |