Consider this code:
var Someclass = new Class();
var Anotherclass = new Class();
var classes = ['Someclass', 'Anotherclass'];
and I want to create mootools class with a dynamic name. Of course i can do it by eval:
eval('var obj = new ' + classes[0] + '(params);');
but I do not think it is a good solution. How to do this in a "proper" way? Maybe somethink like:
var obj = ObjectFactory(classes[0], params);