digitalkaoz
13 Jun 2007, 3:40 AM
i have some problem in getting instantiated objects.
here is my code shorthand
//create Jame and Jame.widgets
Jame.widgets.Message = function(_title){ //message object
this.title = _title;
alert(test.title); //doesnt work, and i dont know why
}
Jame.widgets.Login = function(_title){ //login object
this.title = _title;
}
test = new Jame.widgets.Login("test"); //instantiate login first
test2= new Jame.widgets.Message("dsfs"); //instantiate message
in the Message Object i cant access the instantiated "test" Object (login), what am i doing wrong?
i would be thankful for any hints...
greetz digitalkaoz
here is my code shorthand
//create Jame and Jame.widgets
Jame.widgets.Message = function(_title){ //message object
this.title = _title;
alert(test.title); //doesnt work, and i dont know why
}
Jame.widgets.Login = function(_title){ //login object
this.title = _title;
}
test = new Jame.widgets.Login("test"); //instantiate login first
test2= new Jame.widgets.Message("dsfs"); //instantiate message
in the Message Object i cant access the instantiated "test" Object (login), what am i doing wrong?
i would be thankful for any hints...
greetz digitalkaoz