General Type Creator
BlitzMax Forums/BlitzMax Programming/General Type Creator
| ||
Hi. Is it possible to make a function that will create a Type by demand. lets say i have 3 types and I want one function to create it Type Car_Type End Type Type Plane_Type End Type Type Skate_Type End Type Function CreateType(Type_Type=Car_Type) End Funcion Lets say i have hounderds of types.. is there a way for that? |
| ||
Only with casting and reflectionFunction CreateType:object(type:string) 'reflectionstuff '... return newobject End Function local ObjA:TObjA = TObjA(CreateType("ObjA") bye Ron |
| ||
I dont know what casting and reflaction are but i found another way.. Last edited 2012 |