开发者

Extending the TcpClient Class in the oscP5 Processing Library

开发者 https://www.devze.com 2023-02-23 06:36 出处:网络
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 TR

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消