Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
callbacks on "this" with Java libraries don't... usually... work #201
I feel like there was a note about this behavior somewhere in the documentation at some point, but I can't find it now, so apologies if this is a known issue...
Here's a Python translation of the
This example runs happily but does not execute the
I suspect the reason for this is that the Net library uses class.getMethod() to discover the appropriate method to call at run-time, and (a) functions you define in your Processing.py sketch don't become methods in the
For better or worse, the design pattern of "define a function with a particular name and pass
This bug conflates two unrelated issues. The passing of
There is no way to do such a thing on the fly, without modifying byte code. That's not impossible, but it's a large-scope project, perhaps suitable to a master's degree-level summer project.
Do me a favor: for each library (such as oscP5) that you find is incompatible with Python Mode, please file a bug, and I'll do what I can to hack around their design (including providing functions at specified names). I won't be able to do all of them, but I can certainly do everything reasonable.