Skip to content
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

Regression: smooth(4) shows “smooth() can only be used inside settings()” error #149

Closed
benfry opened this issue Oct 16, 2020 · 5 comments · Fixed by #152
Closed

Regression: smooth(4) shows “smooth() can only be used inside settings()” error #149

benfry opened this issue Oct 16, 2020 · 5 comments · Fixed by #152
Assignees

Comments

@benfry
Copy link
Owner

benfry commented Oct 16, 2020

Looks like smooth() not properly being hoisted out of setup() in 4.x, inside the PDE this results in “smooth() can only be used inside settings()” in the console.

void setup(){ 
  size(300,300, P2D);
  smooth(4);
}

void draw(){
  background(0);
  fill(255,0,0);
  ellipse(100,100,100,100);
  fill(0,255,0);
  ellipse(150,150,100,100);
}
@sampottinger
Copy link
Collaborator

sampottinger commented Oct 16, 2020 via email

@benfry
Copy link
Owner Author

benfry commented Nov 21, 2020

Any luck?

@sampottinger
Copy link
Collaborator

sampottinger commented Nov 21, 2020 via email

sampottinger added a commit that referenced this issue Nov 21, 2020
In response to #149,
adding tests to catch issues with smooth and noSmooth in the
preprocessor. Issue found by @benfry.
sampottinger added a commit that referenced this issue Nov 21, 2020
@sampottinger
Copy link
Collaborator

I have a PR for you @benfry at #152. Apologies for the delay!

Screen Shot 2020-11-21 at 11 59 19 AM

@benfry
Copy link
Owner Author

benfry commented Jan 17, 2021

Resolved for 4.0a3 with code from @sampottinger.

Repository owner locked as resolved and limited conversation to collaborators Jan 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants