TG_Laszlo
04-01-2004, 05:01 PM
Hi everyone, I feel really stupid, but I got this problem with a for command. I have a list component on the canvas that has an instance name of Image_List. Now I put this code in the try to add three images with scripting,
Images = 3;
Image1 = "go.png";
Image2 = "gs.gif";
Image3 = "asdf.jpg";
count = Images;
for (c=0; c<count; c++) {
output = Image+c;
Image_List.addItem(output);
}
and ive tried putting this in too but still nothing
for*(c=0;*c<count;*c++)*{
output*=*eval(Image+c);
Image_List.addItem(output);
}
Now Am I doing something wrong here? it prints out three cells Image1 Image2 and Image3. But I want it to have the variables of the image filenames inside the the list instead, like have the list show
go.png
gs.gif
asdf.jpg
Images = 3;
Image1 = "go.png";
Image2 = "gs.gif";
Image3 = "asdf.jpg";
count = Images;
for (c=0; c<count; c++) {
output = Image+c;
Image_List.addItem(output);
}
and ive tried putting this in too but still nothing
for*(c=0;*c<count;*c++)*{
output*=*eval(Image+c);
Image_List.addItem(output);
}
Now Am I doing something wrong here? it prints out three cells Image1 Image2 and Image3. But I want it to have the variables of the image filenames inside the the list instead, like have the list show
go.png
gs.gif
asdf.jpg