Hello.
I have a class that extends a Canvas subclass (VLayout for example) and implements an interface. Lets call this class MyVLayout.
The interface declares a method with the following signature:
public Canvas getCanvas();
public class MyVLayout extends VLayout implements MyInterface {
public MyVLayout(...) {
...
}
@Override
public Canvas getCanvas() {
return this;
}
}
Whenever I try to add MyVLayout to any other class that takes in a Canvas, I end up with an infinite loop.
HLayout otherLayout = new HLayout();
otherLayout.addMember(MyVLayout.getCanvas()); // causes infinite loop
[edited : removed]
Although there are no methods with the getCanvas() signature in VLayout class or even in the Canvas class, this is somehow causing problems. My assumption is that the library is using this internally somehow.
Or then maybe not… I modified the method signature in the interface and the problem still happens.[edited]
Using 2.5.2011-05-14-EVAL library.
Thank you.