create a new unknown type?

BlitzMax Forums/BlitzMax Programming/create a new unknown type?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

do you know how I would create a method or function in the base type
that would create a new instance of the extended type?
Something like this?

Type BaseType
	Field whatever:Int
	
	Method MakeNew:BaseType()
		Return New Self
	EndMethod
EndType

Type SomeType Extends BaseType

EndType


Local a:SomeType=New SomeType
Local b:SomeType=SomeType(a.MakeNew())