dynamic object creation



Is there a way to do something similar to this?

var classname: string;

classname:='someclass';

myclass:=<class contained in classname variable (someclass)> .create;

I need to end up with myclass variable that holds reference to newly created
someclass object.

I can do classfactory class and do a lot of if-s but that's horrible
solution, and I'm pretty sure there's a nice and clean solution to this one.

Thanks,

Brko


.