Extending the TcpClient Class in the oscP5 Processing Library
I am trying to extend the TcpClient class in the oscP5 library for Processing. I have already imported netP5.* and oscP5.* in my main sketch. However, the following code produces this error: expecting TRIPLE_DOT, found ','. What is wrong with how I extended it? Am I supposed to add all of those arguments in the constructor?
class GameClient extends netP5.TcpClient {
int score;
//some more variables
public TcpClient(Object theObject, S开发者_如何学运维tring, theAddress, int thePort) {
//This is the constructor.
}
//I want to override this function
public void dispose() {
println("dispose() called.");
}
}
Thanks for your help.
please look at your example:
public TcpClient(Object theObject, String, theAddress, int thePort) {
you have a comma between String
and theAddress
which doesn't belong there.
精彩评论