We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello, I have an app I wrote using some alpha version of 3.0 some time ago.
In that version, I was using command line arguments accessed via args
in setup() to do some things. As of now in 3.0.2, it appears args is null.
What's the proper way to access command line arguments in 3.0.2?
Answers
windows?
if you export an application you can see the generated java
so they are being passed in... to papplet main anyway. it calls setup() with no arguments though.
https://github.com/processing/processing/blob/master/core/src/processing/core/PApplet.java says
https://forum.Processing.org/two/discussions/tagged?Tag=args[]
Hi,
Thanks for your replies, I've figured out the problem.
In previous versions of processing,
args
would be an empty array if no arguments are passed. In the latest, it's null in the same case.Adding a null check solved my problem,
Thanks