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 › Re: Object arrays
Page Index Toggle Pages: 1
Re: Object arrays (Read 808 times)
Re: Object arrays
May 20th, 2005, 12:01pm
 

Bloody modem!!!!

images is a vector containing references to a variety of objects that all implement an interface called Image. How would I access the display(); method?

Code:

println(images.elementAt(positionElement));


the above gives the correct reference, it's just a question of syntax.

Thanks
Re: Object arrays
Reply #1 - May 20th, 2005, 12:20pm
 

Got it!

   ((Image)images.elementAt(positionElement)).display();
Page Index Toggle Pages: 1