If you write your renderer in AS instead of MXML, you can pass a
reference to the parent when you call the constructor for the class e.g.

in calling class (Application)

myRenderer:myRendererClass = new myRendererClass(this);
someObject.cellRenderer = myRenderer.doRender;

in custom Renderer (constructor)

private var owner:Object;
public class myRendererClass{
  public function myRendererClass(obj:Object){
  owner = obj;
  }
  public function doRender(dataObject:Object):object{
  }
}

That's they way I do it. Good Luck


--- In [email protected], "JesterXL" <[EMAIL PROTECTED]> wrote:
>
> Haven't tried myself, but give parent a shot since he should be a 
> DisplayObject.  Don't have the livedocs available to confirm yet.
> 
> ----- Original Message ----- 
> From: "Brendan Meutzner" <[EMAIL PROTECTED]>
> To: <[email protected]>
> Sent: Monday, January 30, 2006 10:11 PM
> Subject: [flexcoders] listOwner equivalent Flex 2
> 
> 
> Hi,
> 
> So working with CellRenderers in Flex 2.0 is great... easy... however,
> what if I want to reference the parent control via "listOwner" as in
> Flex 1.5?
> 
> Brendan
> 
> 
> 
> 
> 
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
> Yahoo! Groups Links
>






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to