I have a odd problem with reference to a variable. My setup is following:
var pattern = {/* some object with patterns */};
var view = (new function() {
this.create_single = function(response) {
pattern.block // this returns pattern object correctly
};
this.create_multi = function(response) {
pattern.multi_block // this returns pattern as undefined
};
}());
var data = (new function() {
this.acquisition = function(response) {
view.create_single(response);
view.create_multi(response);
};
}());
So in the create_multi method pattern variable returns undefined and i don't have any clue why its happening. In Adobe Dreamweaver (which i am using to write code) i have a line error that says 'pattern' used out of scope. Can anyone help me understand what is happening ?
Thank You for all the help ;)
multi_blockinside the pattern object ?patternitselfundefinednotmulti_blockproperty inside