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 & HelpPrograms › help with checking for object association
Page Index Toggle Pages: 1
help with checking for object association (Read 537 times)
help with checking for object association
Jun 21st, 2009, 10:31am
 
Hi
I have a program where I am making connections between objects of the same class. I want to ensure that I don't make the same connectiontwice and I'm looking for a smart way to do it - the dumbest way I figure would involve making a child array within each class to which I might add each connecting object and check within that list each time before making additional connections...is there an easier way?

if I go the dumb checking route, how do I see if an object is already in an array that I have specified? DO I go through each item in the array and check to make sure that I don't uncover some identifier of that object?

thanks for any advice
Page Index Toggle Pages: 1