G4P guides, issues and changes

It has been ages since I updated the website so I got my duster out and got to work,

There are 2 main changes

Programmer Guides
There have always been guides on some of the more esoteric features but this area has been updated to include beginners guides on how to create controls (without the aid of GUI Builder :grin:) and setting up event handlers. See the guides here.

G4P issues with Processing
G4P has its fingers deep within Processing and sometimes bugs in either G4P or Processing adversely affect G4P’s performance. Some have been mentioned in this forum and/or raised as Processing Issues on Github but I thought bringing the information together would be useful. So a new webpage has been dedicated to documenting these.

Changes for next version of G4P
From the very first version of G4P it was possible for the user to request mouse-pressed and mouse-released events on buttons. This is being removed in the next version. Also the sketchpad control (GSketchPad) is being replaced by an exciting new control, more info in the next few days.

5 Likes

Thanks for your hard work.
cameyo

Hi Peter,

I just dusted off an application I built using Processing 3.2.3 and a version of you library of similar vintage that used “GSketchPad”. After installing the latest of both and running the code it appears you have replaced this function, but I can only find a reference to the change in this stream. Could you direct me to the replacement?

Is it easier to just find and older version of your library? Unless the updates over the last year improve the experience significantly. I will be giving the app a new UI so your library will be key to accomplishing this.

Thanks!!

The GSketchPad control was replaced by the GView control in the last release of G4P. Converting a sketch using GSketchPad to work with the latest version of G4P is fairly straight forward, we simply replace the GSketchPad object with a GView object.

If you look at the code that creates the GSketchPad you will see that a PGraphics object is created and added to the sketchpad object. In the latest version of G4P creating a GView object also creates the PGraphics object and you can get a handle on the PGraphics object with view.getGraphics()

Thanks Peter!

Would you be able to send me a link to a sketch that was created using the new control, so I can compare?

There will be an example of the GView control with the library. In Processing select File > Examples from the menus and a dialog box will appear. Goto Contributed Libraries > G4P to find it.