G4P Tool - setTitle - 3.0a9

Good afternoon

I have decided to try out 3.0a9 following a system format after using 3.0a5 for quite some time.

I'm experiencing an interesting problem where my sketches crashes in the createGUI() function with a NullPointerException after this code

if(frame != null) frame.setTitle("myApp");

and the console prints out the following

Use surface.setTitle() instead of frame.setTitle in Processing 3

I have also tried creating a new sketch, but it has the same problem.

When I installed the G4P library I'm pretty sure it installed v3.5.2, but the printout in the console printer v3.5.3. To be sure I downloaded v3.5.3 from Quarks Place and replaced the installation directory (I saw mention of a NullPointerException fix).

Answers

  • Wait, it seems there is more to the problem.

    I have replaced frame with surface, as suggested, but still get the NullPointerException. I now release that it seems to be happy with frame and surface and the NullPointerException is thrown where the first object of the GUI is created, for instance

    label1 = new GLabel(this, 37, 47, 80, 20);

    As I mentioned, this happens with my old projects as well as a blank project with just a label and a button.

  • Answer ✓

    G4P is not compatible with PS 3.0a9 in fact 3.0a5 is the last version of PS that G4P will work with.

  • Oh, I see. Are you planning on supporting it further once they are out of alpha/beta?

  • Answer ✓
    • Transition from Processing 1 to 2 was very hectic, w/ constant break of libraries trying to keep up.
    • Not worth the waste of time to re-fix & re-compile libraries for each alpha release!
    • At least Processing 2 alpha had some guidelines about what was needed for compatibility.
    • Now not even that for Processing 2 to 3's transition! [-(
    • Even worse, since P3.0a6, main class PApplet doesn't extend class Applet anymore.
    • Now it needs to re-implement everything Processing had for granted from Applet!
    • It's easy to see it's the most compatibility breakage Processing ever had! :-\"
    • My advise, stay away from anything past P3.0a5 until we got a real Processing 3 release! :-h
  • Answer ✓

    @GoToLoop has summarised the situation quite succinctly but I would like expand on what he has said, especially in relation to G4P.

    Are you planning on supporting it further once they are out of alpha/beta?

    Interesting question.

    When Processing moved from PS1 to PS2 I tried to maintain G4P through the alpha and beta releases because people wanted to use these Processing releases. It was a big mistake on my part.

    One of the main changes in PS2 was to move away from using java.awt.event classes for the event handling to simplify working with multiple modes / languages. Unfortunately the changes I made meant that G4P no longer worked with PS1 and since PS2 was not fully implemented and tested there were times when G4P did not work with PS1 or PS2.
    So no one was happy especially me because I was stuck between a rock and a hard place.

    This is the reason I have NO intention of attempting to keep G4P compatible with PS3 alpha/beta releases but there are 2 other reasons

    1) The internal changes being made with PS3 have a fundamental impact on the inner workings of G4P, much more so than the changes made in PS2.

    2) I can find no documentation to support library developers wishing to update their software for PS3.

    One of the key features of G4P is the ability to create multiple windows unfortunately this requires PApplet to inherit from Java's Applet class, and as of 3.0a6 this is no longer the case.

    So back to the original question

    Are you planning on supporting it further once they are out of alpha/beta?

    Until PS3 is out of the alpha / beta stages and until some documentation describing the inner workings / framework structure of PS3 are available I cannot make an informed decision on the way forward.

    If I discover (unlikely) that it is fairly straight forward to update G4P then I will. If not G4P will be maintained (bug fixes only) for PS2 and I may consider creating a new GUI library to replace G4P for PS3.

    Hope this clarifies the situation :)

  • Hi guys

    That's a sad tale, but I completely understand the pain and frustration. G4P has really helped me a lot and so has quark himself. I'll stick to 3.0a5 for now then, as there are some fixes in 3 which I need (serial stuff and compiling).

    I hope beta comes quickly and is smooth sailing and G4P or G4P3 sees new light.

    Good luck and thanks!

    Oh, sorry for the all the 'answer's, I kind of forgot the original question and starting marking from bottom to top..

Sign In or Register to comment.