We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I am trying to extend the Blob-class of v3ga blobDetection library but I get an error saying:
implicit super constructor Blob() is undefined. must explicitly invoke another constructor
Calling super() in the constructor did not help because it says that class Blob does not have a constructor Blob()
.
Does anybody have experience in extending this class?
Answers
AFAIK, we aren't obliged to call parent class w/
super()
? :-/It is the case when a parent class defines a constructor with parameters, but not one without parameter.
Then, a class extending it must explicitly call the super-constructor of its parent.
Example:
You will get this error. Solutions: if you can, add a parameterless constructor to the parent class, if it makes sense (you cannot, here), or call
super(goo);
at the start of the sub-class' constructor.Thanks for your comments. It worked out calling
super(parent)
while parent is the blobDetection-object