We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › Found too many { characters without a..
Page Index Toggle Pages: 1
Found too many { characters without a.. (Read 357 times)
Found too many { characters without a..
Feb 18th, 2009, 7:46pm
 
Error: "Found too many { characters without a } to match it"

Hi

No I have not gone mental, I can not get rid of this error message.
I have two classes, In and Out. Deleting the Out, which displays the error, just results in the error message turning up in In and visa versa.

Even when deleting both classes so my sketch is just a setup() method results in the error.

class Out
{
 public void print(String s)
 {
   System.out.print(s);  
 }

 public void println(String s)
 {  
   System.out.println(s);
 }
}

Has it to do with me upgrading to 1.01 or have I gone completely blind to something obvious?

Hope someone can help, Thanks :)
Re: Found too many { characters without a..
Reply #1 - Feb 18th, 2009, 8:48pm
 
Can you post a full example?  That is, strip the file down to the absolute MINIMUM amount of code that still yields the error, and post that?

It's pretty hard to help seeing only a tiny portion of code for something like that.
Re: Found too many { characters without a..
Reply #2 - Feb 20th, 2009, 9:06am
 
I tried to bugfix a problem like this too...

there is one thing to think off while searching for the missing parenthesis or the one that should be there...

there is this feature that highlights the other corresponding parenthesis when clicking next to one. But it doesnt disregard the ones you commented out... so if there is somwhere a line of code that you commented out but ends with an //{  its all messed up... just to have that in mind while searching for the error...

but like he said, just post it and we can take a look.
Re: Found too many { characters without a..
Reply #3 - Feb 20th, 2009, 5:45pm
 
Hi

Sorry Im so slow to get back, for some reason I need to do work at the place I sit around all day drinking coffee???
Thank you for your suggestions:)

I actually ended up rewriting my main sketch and 3 classes from scratch, and then the error disappeared.
(It actually disappeared half way through the 2nd class) .

As the class I was rewriting, when it suddenly worked, wasn't the original class where the error appeared I got suspicious and did a little test.
It turns out that I can get a a class/tab with a missing parentheses to display an error in another class tab that does not even use or instantiates the problem class?

I have never encountered this before, I read the release notes and bug reports for 1.0 in my attempt to find a reason and I saw that the compiler error messages have been given a workthrough.. could this be a new feature;)

Or have I just been lucky and never encountered this before in my 100+ sketches in processing?
Anyone else tried this?

Re: Found too many { characters without a..
Reply #4 - Feb 20th, 2009, 6:18pm
 
Wow.  If it's some weird parser bug that affects things in a whole different code window, then you should definitely figure out how to reliably reproduce the error and submit a bug report.

That's not a good bug to have, if that's what it really is.
Page Index Toggle Pages: 1