Extended Type Methods

BlitzMax Forums/BlitzMax Programming/Extended Type Methods

JoshK(Posted 2006) [#1]
Type a
	Method do()
		Notify 1
	EndMethod
EndType

Type b Extends a
	Method do()
		Notify 2
	EndMethod
EndType

n:b=New b
n.do()


Is there any way to make it so that calling do() performs the base type function, then the extended type function? I have a special entity that extends the base entity class. Any time this special entity is rotated, I need some special updating to occur, but would rather not rewrite the base entity method in the extended method.


tonyg(Posted 2006) [#2]
Type a
	Method do()
		Notify 1
	EndMethod
EndType

Type b Extends a
	Method do()
	    Super.do
		Notify 2
	EndMethod
EndType

n:b=New b
n.do()