We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I'm playing with the 3.0a versions and have been using 5 for a while and upgraded to 9 after a format. I see quite a lot has changed (awesome!), but am finding some things not working. I hope I did enough research before posting here.
I'm using 'sketchPath' to determine the path of the sketch to open some files in my data folder
String UBUPFile = sketchPath + "/data/UBUP.bin";
Where this has been working fine up until 3.0a5, in a9 it produces the following error
The field PApplet.sketchPath is not visible
There doesn't seem to be anything in the revisions.txt, unless I missed something
So they're even spreading
privateeverywhere making our lives much harder! X(
It's worth a try to use dataPath("") instead though...
It makes sense to make the
sketchPathprivate because it is set by the Processing core. Being able to change it is likely to cause the sketch to behave oddly.
Anyway this works in 3.0a9
At least we've got at least 4 kinda "getters" for sketchPath:
AFAIK, it is the PDE itself which tells the running sketch where is the sketchPath.
And I've got a case where it fails: when we override Processing's main().
Therefore there are times when we need to specify our own sketchPath.
Again I ask what benefit
privatebrings to us, both answerers & users. :(|)
For reasons you know, given your feedback on the other thread, I will stick with 3.0a5, but have written an empty sketch to just test the 'Path' variants in 3.0a9 so I can 'answer' flag the comments.
A more logical usage is:
The incident illustrates the danger of using exposed but undocumented API / fields!
I've been out of programming for many years and am starting to work on personal projects in Processing. Can you explain the qualitative difference in the syntax between the two sets of assignment statements? I understand both notations, but why is the second usage preferred?
PS: is this an appropriate place to ask questions, in line like this? or should I post general programming questions exclusively in "How To"?