扩展 oscP5 处理库中的 TcpClient 类
我正在尝试扩展 oscP5 库中的 TcpClient 类进行处理。我已经在我的主草图中导入了 netP5.* 和 oscP5.* 。但是,以下代码会产生此错误:期望 TRIPLE_DOT,找到“,”。我的扩展方式有什么问题吗?我应该在构造函数中添加所有这些参数吗?
class GameClient extends netP5.TcpClient {
int score;
//some more variables
public TcpClient(Object theObject, String, theAddress, int thePort) {
//This is the constructor.
}
//I want to override this function
public void dispose() {
println("dispose() called.");
}
}
感谢您的帮助。
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, String, theAddress, int thePort) {
//This is the constructor.
}
//I want to override this function
public void dispose() {
println("dispose() called.");
}
}
Thanks for your help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请看看你的例子:
String
和theAddress
之间有一个逗号,该逗号不属于那里。please look at your example:
you have a comma between
String
andtheAddress
which doesn't belong there.