Hi all,
I'm having a bit of trouble trying to work out the correct syntax when setting dynamic variables based on classes. My class is called PIMAppt. This is a simplified version of my code.
The following works -
var NewAppt0
IMAppt = new PIMAppt ("value1", "value2", etc);
However I want to make the number in the name dynamic (NewApptX).
I've tried this in a for loop but it doesn't work -
this["var " + "NewAppt" + i + "
IMAppt"] = new PIMAppt ("value1", "value2", etc);
Is there another way to setup the left handside of the argument? Any suggestions would be really appreciated.
Cheers,
RadioStar
I'm having a bit of trouble trying to work out the correct syntax when setting dynamic variables based on classes. My class is called PIMAppt. This is a simplified version of my code.
The following works -
var NewAppt0
However I want to make the number in the name dynamic (NewApptX).
I've tried this in a for loop but it doesn't work -
this["var " + "NewAppt" + i + "
Is there another way to setup the left handside of the argument? Any suggestions would be really appreciated.
Cheers,
RadioStar