About Insatances and paths

2 отговора 61 прегледа
#1

About Insatances and paths

Zdraveite, imam edin dosaden problem /pone za mene e dosaden zashtoto go macha ot dosta vreme i veche mi pisna da go tursia sam ta reshih da popitam/
ta imam az slednia script

$step = 30;
for($i=0;$i<4;$i++){
$title = "Title"+$i;
this.createTextField ($title,$i, ($step*$i), 0 , 20, 30);
this.$title.text = "aaaaa";
}

Znachi problema e che nashto barkam patisahtata /mai/
this.$title.text ne e propertito text na instanciata Title0/1/2/3 i t.n. shte mi kajete li kak se vika instanciata, kogato e dinamichno generirano?

Blagodaria Vi predvaritelno

Отговор
в отговор на Bahur #2

Re: About Insatances and paths

Probvai taka :)
step = 30;
for(i=0;i<4;i++){
title = "Title"+i;
this.createTextField (title,i,(step*i), 0 , 20, 30);
this[title].text = "aaaaa";
}

Отговор
в отговор на [venata] #3

Re: About Insatances and paths

Thanks varshi rabota

Отговор