Why would you extend PApplet (first post so go easy please)
in
Android Processing
•
11 months ago
I'm fairly new to processing (about 2 months) and I'm from a C/C++ background so I have no idea about java.
I think I've just about got to grips with all the basics & how to use most of the functions given in the reference, however every once in a while when perusing these forums I come across ALOT of things that aren't in the reference or learning topics. One of these is PApplet.
I understand creating a class that extends PApplet gives you access to the methods & members of PApplet which are 'hidden' but the question is;
where can I find the methods & functions of PApplet and more importantly is there a tutorial somewhere giving examples of why you might want to extend PApplet?
The main reason I'm interested in PApplet is because I would like to implement something like this (
https://forum.processing.org/topic/multiple-papplet-on-android) for creating multiple screens so that you can use the back button easily to go back to the previous screen in android mode + it just seems like a very elegant way to organise code. (or is there an easier way to do this?)
More questions;
Why extend PApplet, why not just create an object of PApplet and use the methods?
Where does this come from; '
gNotificationManager' which is on line 14 in the code (see above link). Unfortunately I can't remember some of the other 'alien' keywords & functions that I've found while looking through the forums but I'm guessing some of them are from pure java code? and maybe some from android sdk libraries? or even contributed libraries since people post snippets of code sometimes and not the full code.
Thanks alot.
1