Closed jimfingal closed 10 years ago
I see in JavaScriptBuild.java there is a warning against doing this -- but the warning doesn't get reported to the base client or exported to the html.
Thanks!
It's not allowed/wanted in Java either .. as there is no way to correctly parse these variables during build.
http://processing.org/reference/size_.html
Do not use variables as the parameters to size() function, because it will cause problems when exporting your sketch. [...]
Yes, it could be more explicit about that.
Ah, yeah that makes sense / is very explicit in the documentation. That was just throwing me because I didn't see that and it worked in one place and not the other. Apologies for the spurious bug.
All good, thanks for reporting this will someone in the future running into it ...
In processing 2.1 on OSX 10.7.5, I am experiencing and issue in Javascript mode when exporting a sketch for web.
In the javascript mode, when entering numbers directly into "size()", like:
The javascript correctly exports to a canvas tag correctly as:
However, when stored local or global int variables are passed into the function, like:
The canvas tag renders incorrectly, as:
When passed the variables directly, the server will not run:
And gives the error:
A sketch that can replicate the issue: