I have a singleton class based on Joose and I would like to add initialization arguments to it like this:
var programs = Programs.getInstance({
tabContainer: '#tab'
});
tabContainer is also declared as an attribute to the singleton.
In my after method modifier initialization method, I track to see if the arguments passed in was read like this:
after: {
initialize: function(){
alert(this.getTabContainer());
}
}
But the alert produces the default value given, not the initialization value I passed to it.
Any idea how to pass arguments to the singleton in Joose?
I tested the same thing using regular class definitions in Joose and the above code alerts the proper argument.