Bug 249 : processing.net (server functionality) fails on application export (0098 Beta)
Last modified: 2005-12-18 16:37




Status:
RESOLVED
Resolution:
INVALID -
Priority:
P2
Severity:
normal

 

Reporter:
splat
Assigned To:
fry

Attachment Type Created Size Actions

Description:   Opened: 2005-12-16 20:29
Applications will not export when using Server()

"Semantic Error: No applicable overload was found for a constructor with
signature "Server(Server, int)" in type "Server". Perhaps you wanted the overloaded
version "Server();" instead?"
Additional Comment #1 From fry 2005-12-18 12:53
this works fine for me. are you sure you have the import statements
properly included?
Additional Comment #2 From splat 2005-12-18 15:08
Yes, I'm sorry to say I'm having some trouble isolating the exact issue. The code is
simple though:
___________________________________________________________
import processing.net.*;

int port = 10002;
Server myServer;

PFont font;
String message="None";
void setup()
{
size(400, 400);
background(0);
font = loadFont("ArialMT-10.vlw");
textFont(font, 10);
myServer = new Server(this, port);
}

void draw() {
if(message !=null){
text(message,100,100);
}
}


void serverEvent(Server someServer, Client someClient) {
message = someClient.ip();
}
______________________________________________________________

It runs fine in the editor, but on export gets:
______________

C:/Documents and Settings/Processing/application.windows/Server.java:16:14:16:35:
Semantic Error: No applicable overload was found for a constructor with
signature "Server(Server, int)" in type "Server". Perhaps you wanted the overloaded
version "Server();" instead?


processing.app.RunnerException: Perhaps you wanted the overloaded version "Server
();" instead?

at processing.app.Compiler.message(Compiler.java:332)

at processing.app.MessageSiphon.run(MessageSiphon.java:60)

at java.lang.Thread.run(Unknown Source)
_______________



Additional Comment #3 From fry 2005-12-18 16:20
check the generated .java file to see what import statements are included
at the top. there's probably another package that's being included that
contains a class called "Server". it would appear that this is different
for exporting the application than just running it internally.
Additional Comment #4 From splat 2005-12-18 16:30
HA!

My PDE was called "Server" hence Server.java which was causing the issue. Sorry for
jumping to conclusions. Interesting to note (for me anyway) that the PDE name can
cause override issues though.