How to extend a class?
in
Programming Questions
•
2 years ago
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.
http://wind-up-toy.com
1