Open rturknett opened 10 years ago
I believe you will find this functionality commented out in Process.java. You will also need to register the events in the process constructor if the process is the head node.
-Brandt
Hey Brandt I'm taking a look at this now. Did you test it, or did you stop before you got it working?
It was working. I believe there was a side effect that prevented it working fully. It's worth a try to re-enable it and see what happens!
-----Original Message----- From: "Rob Turknett" notifications@github.com Sent: 6/6/2014 7:35 AM To: "TACC/MassivePixelEnvironment" MassivePixelEnvironment@noreply.github.com Cc: "Brandt Westing" bmwesting@gmail.com Subject: Re: [MassivePixelEnvironment] Automatically pass mouse events fromhead node (#24)
Hey Brandt I'm taking a look at this now. Did you test it, or did you stop before you got it working? — Reply to this email directly or view it on GitHub.
Tried re-enabling it but it didn't work :(
It compiles with warnings but it won't run:
The class mpe.Process is incompatible with Processing 2.0.
A library (or other code) is using registerMouseEvent() which is no longer available.
Stopping the sketch because this code will not work correctly with OpenGL.
It looks like you have both the deprecated syntax and the new syntax in the listener registration code:
if(enableDefaultSerialization_)
{
pApplet_.registerMouseEvent(this);
pApplet_.registerKeyEvent(this);
pApplet_.registerMethod("mouseEvent", this);
pApplet_.registerMethod("keyEvent", this);
}
But pApplet.keyEvent and pApplet.mouseEvent are also deprecated now as well:
// gets mouse and keyboard events from head process
if(c.k != null)
{
pApplet_.keyEvent = c.k;
}
if(c.m != null)
{
pApplet_.mouseEvent = c.m;
}
I'm looking into it...
It would be nice if mouse events were automatically passed so that many interactive sketches would "just work". Is this doable, or can we make it simpler at least?