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 › textWidth null pointer
Page Index Toggle Pages: 1
textWidth null pointer? (Read 283 times)
textWidth null pointer?
Mar 8th, 2008, 12:29pm
 
Quote:

 TextButton(Panel p, String txt, int ix, int iy, int iw, int ih){
   super(ix, iy, 14+ih, iw, p);
   label=txt;
   w=int(textWidth(txt)+iw);
 }


For some reason, this throws a null pointer exception? Anyone know why?

I'm in OGL mode, that's the only reason I can think of, but it's not documented anywhere that textWidth isn't supported in OGL.
Page Index Toggle Pages: 1