# Warnings using noSmooth() in setup()

**URL:** <https://discourse.processing.org/t/warnings-using-nosmooth-in-setup/21703>\
**Category:** Coding Questions\
**Created:** [June 9, 2020, 1:28pm UTC](https://discourse.processing.org/t/warnings-using-nosmooth-in-setup/21703 "2020-06-09T13:28:39Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [June 9, 2020, 1:28pm UTC](https://discourse.processing.org/t/warnings-using-nosmooth-in-setup/21703/1 "2020-06-09T13:28:39Z")

</div>

Hello,

Can anyone help me understand what is happening here?

Ok:

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/a/a9b8245ed2a127da7c003edc3e25ddc107fb22f0.png)  
Ok:  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/3/32c5e4cbb63ab5ead0df09dc31735dbd0b8175aa.png)  
?  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/9/9f7dfb03a72a56daec7966b7d719c9ef61176062.png)  
?  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/5/5dabcbb7456adf03a9abb3235a3f899a8e9280f0.png)  
?  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/f/f9dabdea45fafaf89185d4f7402f8e13fe668140.png)

`:)`

---

<div class="post-metadata">

**Author:** ![slow\_izzm](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/slow_izzm/32/5637_2.png) [@slow\_izzm](https://discourse.processing.org/u/slow_izzm)\
**Post date:** [June 9, 2020, 4:23pm UTC](https://discourse.processing.org/t/warnings-using-nosmooth-in-setup/21703/2 "2020-06-09T16:23:03Z")

</div>

I’m not sure if it is a bug or not … seems like one to me.

this works though …

```auto
void settings() {
  if (true) noSmooth();
}

```

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [June 10, 2020, 12:47am UTC](https://discourse.processing.org/t/warnings-using-nosmooth-in-setup/21703/3 "2020-06-10T00:47:11Z")

</div>

Still trying to understand the “why” of these error messages when it should work in setup().  
See previous post.

Two more examples below; I thought I would try Processing 4.

Using example from reference:  
[https://processing.org/reference/noSmooth\_.html](https://processing.org/reference/noSmooth_.html)

Processing 3.5.4 (no error msg)

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/7/7b2b6ff06140b0b8b00568f378ccab4f7f657f15.png)

Processing 4.0a1 (error msg)

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/c/c68ebb29275177b79ca99e42ea9a1cbd4edb18c3.png)

`:)`

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [June 10, 2020, 1:04am UTC](https://discourse.processing.org/t/warnings-using-nosmooth-in-setup/21703/4 "2020-06-10T01:04:01Z")

</div>

> [@slow\_izzm](#):
>
> I’m not sure if it is a bug or not … seems like one to me.

It certainly puzzled me.

I would really like to know why.

I will consider this as a Processing quirk for now and have my workarounds.

`:)`

---

<div class="post-metadata">

**Author:** ![slow\_izzm](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/slow_izzm/32/5637_2.png) [@slow\_izzm](https://discourse.processing.org/u/slow_izzm)\
**Post date:** [June 10, 2020, 1:14am UTC](https://discourse.processing.org/t/warnings-using-nosmooth-in-setup/21703/5 "2020-06-10T01:14:48Z")

</div>

I noticed some issues file on the processing repo dealing with `noSmooth()`, none are this exact issue, but seems the method may be buggy.

I would file an issue and see what comes of it.

---

<div class="post-metadata">

**Author:** ![monkstone](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/monkstone/32/64_2.png) [@monkstone](https://discourse.processing.org/u/monkstone)\
**Post date:** [June 10, 2020, 5:06am UTC](https://discourse.processing.org/t/warnings-using-nosmooth-in-setup/21703/6 "2020-06-10T05:06:52Z")

</div>

If you check the java code emitted by the preprocessor, you will find size and smooth have been moved to settings from setup.

```auto
public void settings(){
   size(200, 200);
}
 ....
}

```

How, would the preprocessor know how to deal with your code? You should explicitly use settings in the ide to do any thing fancy with size, smooth, noSmooth… You also need to know settings gets called before setup. This is essentially a legacy issue from when [processing.org](http://processing.org) found they needed to deal with size ahead of setup, but did not want to mess with legacy code (would have made books etc look a bit silly as the they refer to using size in setup) but it is not without consequences.

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [June 10, 2020, 8:17pm UTC](https://discourse.processing.org/t/warnings-using-nosmooth-in-setup/21703/7 "2020-06-10T20:17:50Z")

</div>

That’s right – preprocessor attempts to move commands including size and smooth / noSmooth from setup into settings “auto-magically”. It seems like perhaps you have found ANT parser errors that prevent it from matching and moving noSmooth in specific edge cases. I would suggest opening a bug report.

It is still possible (unlikely, but possible) that, going forward, Processing could ditch most of this automagic in Processing 4 and instead document in the reference and in error messages when you are required to use settings().
