What do you think about a collection?

for each ( var chart:BaseChart in chartGroup.getCharts() ) {
       chart.doSomething();
}

Better, isn't it ? :)

Regards,

PS

On Thu, Jun 4, 2009 at 7:49 PM, Trefalgar Bain <[email protected]> wrote:

>
>
> Might be a newbie question, but I'm failing to find this subject in my book
> or on the web.
>
> While you can do variable variables, to create all sorts of fun things, I'm
> looking to create a variable to reference an object already created.
>
> For example ... I have 10 charts on a reporting interface, each with their
> own id and tab. Right now, if I want to make identical buttons affect
> individual charts, I'd have to create 10 buttons, each programed to update
> each individual chart. What I'd like to do is be able to pass the tab name /
> chart id to the function call, so it will know which chart to update.
>
> This way, I only have to create one function to update any chart, instead
> of 10 functions, one to handle each button/chart.
>
> Does that make sense? Is it possible?
>
> chart = 'linechart0';
> {chart}.series = currentSeries;
>
> Tref
>
>  
>



-- 
/**
* Pedro Sena
* Systems Architect
* Sun Certified Java Programmer
* Sun Certified Web Component Developer
*/

Reply via email to