color issue in Processing3.0b1

Hi,

I'm getting an error each time I want to use the color class.

when instanciating a color I have an error saying 'The class "color" does not exist'

In the console there is the following:

color type detected This shouldn't be happening! please report this as an issue

In the errors there is a suggestion of importing the java.awt.Color class but that seems to be a bit exessive

Anyone now what is going on?

Tagged:

Answers

  • Answer ✓

    the color type is a bit odd. it's not a class, it's actually a synonym for int, one that gets replaced during the pre-processing phase before compilation.

    the above seems to suggest that the preprocessing isn't working as it should and 'color's are remaining in the code that gets compiled.

    importing java.awt.Color isn't the way to fix this, it will just confuse things futher.

    post the a small, runnable code sample that shows the problem - there may be a syntax error somewhere else that's showing up as this. at the very least we'll be able to narrow it down to a problem with the version of processing you're using.

  • ok, that makes sense, my mistake was instanciate it as a class using 'new' sorry for being such a noob in this but the console wasn't really helpfull telling me to report it as an issue :-)

  • @Ilumen, you have specifically mentioned that it happened in Processing 3.0b1 beta.
    It automatically implies that it would work on older stable versions! :-@

  • Another hint: when you have a problem, try and show a few lines showing what you tried to do... koogs was good at guessing, but it can just be a waste of time in most cases.

Sign In or Register to comment.