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 › check if variable is set (custom object)
Page Index Toggle Pages: 1
check if variable is set (custom object) (Read 318 times)
check if variable is set (custom object)
Oct 13th, 2008, 1:15pm
 
I'm quite new to Processing and Java but generally know how to program.
I have my own class Palette.
and the variable borderPalette which contains an Object of that Class. So how do I check if the variable is set to set it in case it hasn't been set yet? (I hope this sentence makes sense)

Palette borderPalette;
if(borderPalette) borderPalette = shorten(palettes);
Re: check if variable is set (custom object)
Reply #1 - Oct 13th, 2008, 4:02pm
 
if(borderPalette!=null) ...
Page Index Toggle Pages: 1