I may have made some poor design choices on this one. I have several objects being instanced like this.
core.modules.trial = function(sandbox){
return{
alert_private : function(){
alert(omgpi);
}
};
};
I would like to do this:
core.modules.trial[omgpi] = "external private var";
var trial = core.modules.trial();
trial.alert_private(); //would hopefully output "external private var"
I am trying to assign the omgpi variable to the private scope of the outer function. Normally you would do var omgpi within the outer function before returning anything. But I am trying to do this from an external script when this function is called