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 › Interaction with ArrayList
Page Index Toggle Pages: 1
Interaction with ArrayList (Read 773 times)
Interaction with ArrayList
Oct 12th, 2009, 1:06pm
 
Hello all,

I've been experimenting some stuff on processing and everytime i try to do something with ArrayList class i just cannot figure out how to interact my object with other objects

for example;

thingLocation(Thing t)
{
line(x,y,t.x, t.y);
}

and you call it with arrays like;
t[i].thingLocation(t[j]);

It is okay with Arrays but i just dont know how to interact objects with ArrayList class since it does not use array brackets.

like;

for(int i = things.size() -1; i >0; i++)
{
  p.thingLocation(?);
}

as you see p is just "p" and other object is something i cannot figure out?

i hope my concern was clear,
thanks already
Re: Interaction with ArrayList
Reply #1 - Oct 12th, 2009, 2:26pm
 
Did you check the documentation linked from the Processing reference  Looks to me like it would be worth your while.  For instance you may be interested in what it says about get().
Page Index Toggle Pages: 1