Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically pass mouse events from head node #24

Open
rturknett opened this issue Apr 30, 2014 · 4 comments
Open

Automatically pass mouse events from head node #24

rturknett opened this issue Apr 30, 2014 · 4 comments

Comments

@rturknett
Copy link
Contributor

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?

@rturknett rturknett added this to the Version 2 Release milestone Apr 30, 2014
@bmwesting
Copy link
Contributor

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

@rturknett
Copy link
Contributor Author

Hey Brandt I'm taking a look at this now. Did you test it, or did you stop before you got it working?

@bmwesting
Copy link
Contributor

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" [email protected]
Sent: ‎6/‎6/‎2014 7:35 AM
To: "TACC/MassivePixelEnvironment" [email protected]
Cc: "Brandt Westing" [email protected]
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.

@rturknett
Copy link
Contributor Author

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants