Hello all,
It seems to me that this should work but I cant see what exactly is the problem.
The error Im receiving is "DDROA is not defined"
Could anyone help enlighten me.
var DDROA = {
AllowedRoutes : {
AR0 : {text : 'SomeText', value : 'SomeValue'},
AR1 : {text : 'SomeText2', value : 'SomeValue2'}
},
RouteContext : {
RC0 : {text : 'None', value : '0',
AllowedRoutes : new Array(
DDROA.AllowedRoutes.AR0 // An error occurs here
)
}
}
}
EDIT
For Slack's Comment Can you help explain why I must finish declaring the DDROA.AllowedRoutes and then make another statement to add DDROA.RouteContext in a separate stament. Essentially you are telling me I must
var DDROA = {AllowedRoutes : {}};
then
DDROA.RouteContext = {};
Why the two separate statements. I do things like
var Utilities = {
TextBased : {
someFunction : function(){
//do stuff
},
someFunction2 : function() {
Utilities.TextBased.someFunction();
}
}
};
What is the difference? It seems to me I should get the same error?