I need to create a new instance of a class whose name is dynamically built by:
eval('SomeObject.'+id+' = new SomeClass'+Data.type+'(id, Data);');
// results in:
SomeObject._123 = new SomeClassWithDynamicName(id, Data);
it works fine, but i'd rather avoid the usage of eval (its almost impossible to track errors in code after an eval occured) and do something like this:
SomeObject[id] = new ('SomeClass'+Data.type)(id, Data);