--- In flexcoders@yahoogroups.com, "frank_sommers" <[EMAIL PROTECTED]> wrote:
>
> Hi, 
> 
> I'm trying to pass some custom data into the 
AdvancedDataGridItemRenderer. But as far as I 
> can see, only the datafield can be passed to this component. Is there 
any way to specify to 
> the class factory some other object references, too? 
> 
> In my case, I want the user to be able to affect the UI state from 
within an item renderer, 
> and therefore I'd like to pass references to another UI component as 
well to the 
> AdvancedDataGridItemRenderer. 

You could do something like this

renderer:ClassFactory = new myRenderer();
renderer.properties{relatedComponent:yourComponent};

Then use renderer as your itemRenderer on the ADG.  If you're going to 
do this, you should probably create an Interface so that any component 
you create with that interface will work with the renderer.

However, I'd suggest that instead you have your itemRenderer broadcast 
an event (or pick up one of the events the ADG already broadcasts) and 
listen for that.  Trying to poke a reference to one component into 
another component breaks encapsulation and will result in code that's 
more confusing to anyone coming behind you.

HTH;

Amy

Reply via email to