-
-
Notifications
You must be signed in to change notification settings - Fork 178
The size(); function being wierd #298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
What happens if you remove all of the contents within draw()? I suspect the issue is later in your code. |
If I remove everything from draw(), the same error occurs. |
So, to confirm, you see this error if you run this code?
This is on 3.0b5. What OS? |
In some cases, size must be called in 'settings()' https://processing.org/reference/settings_.html Settings is used for size whenever you are using variables in size() (which you shouldn't anyway) and when you are using another IDE. I THINK this could also be related to a bug regarding size parameters that are larger than the screen size? processing/processing#3401
|
This isn't a "processing-docs" issue, so I am closing it out here. @nick13579, please move this to the forum: http://forum.processing.org |
…ocs#298 (comment) also added .gitattributes file to avoid eol style changes
…ocs#298 (comment) also added .gitattributes file to avoid eol style changes
…ocs#298 (comment) also added .gitattributes file to avoid eol style changes
The settings( ) option was the best way to solve the problem, thanks. |
As per processing/processing-docs#298 (comment), `size()` must be called within `settings` when using variables. This change was required to get the demo to run.
I just upgraded my processing to the latest version(3.0b5), and when I try to run a sketch that used to work, I get an error message:
"size() cannot be used here, see https://processing.org/reference/size_.html"
The example in the link shows the size() in the setup(), like what I have.
Here is my setup() code:
void setup()
{
size(1000, 800);
background(200, 200, 200);
frameRate(60);
}
I tried to use fullScreen() instead of size, but it also said that it "cannot be used here"
The text was updated successfully, but these errors were encountered: