I have added a lot of shapeovals to my presentation ->
drawfunction(a) {
if (a%2 == 1){
for (int h = 8; h>=0; h--){
ShapeOval Xoval = new ShapeOval(true,25+h*50, 150+a*50, 0.0, red, black, 14, 14, 1, LINE_STYLE_SOLID );
presentation.add(Xoval);
}
}
if (a%2 == 0){
for (int h = 9; h>=0; h--){
ShapeOval Xoval = new ShapeOval(true,0+h*50, 150+a*50, 0.0, red, black, 14, 14, 1, LINE_STYLE_SOLID );
presentation.add(Xoval);
}
}
// recursion
if(a != 1){
a = a-1;
drawfunction(a);
}
}
now i want to delete some of them, therefore i needed to save each shape, but it doesnt work.
my idea was a function. it should take a ShapeOval(after generating) and put it into my collection(parameter). but i
always get errors due to types. what's the type of ShapeOval?
Pavel — 09.07.10
Hi Konrad,
You should create a collection variable and set the element's type to ShapeOval. It should work.