var RootComponent = {
init: function(options){
options = jQuery.extend({name: 'Root'}, options);
this.run('ContainerComponent.init')(options);
}
}
To this is then applied a new method, called "run". And this run the method found in the path with the this context. Now what issues do you think I might have? thanks
klass.run = function(path){
var that = this;
return function(){
// here will be calculated the path, based on the input, this is just an hard coded example...
that.sb.klasses['ContainerComponent']['init'].apply(that, arguments);
}
}
that.sb.klasses['ContainerComponent']['init']can and should be written as:that.sb.klasses.ContainerComponent.init