I've asked something similar to this question before, and Gordon told
me that setting names is not a recommended practice.  This confuses me
though, It seems that if you can't set the name, then getChildByName
is not very useful.
http://tech.groups.yahoo.com/group/flexcoders/message/71016

I have tried the name thing though, and I think your right, it's not
recursive.  Since my RTEs are nested I would have to reference the
parent VBox which would be dynamic and I would be in the same situation.

I can't simply pass a reference because I am using a webservice that
hits a .NET backend.  Maybe there is a way but I am not aware of it.




--- In [email protected], "scott_flex" <[EMAIL PROTECTED]> wrote:
>
> 
> This will work....
> RichTextEditor(this.getChildByName("item1")).htmlText = "TEST"
> 
> ... if your RichTextEditor object has the name, item1, not ID.  
> getChildByName as it states finds your object by it's name property not 
> the ID property.
> 
> You'll also have to make sure that whatever object you are calling 
> getChildOByName on, the rich text editor is a direct child of it.  I 
> don't believe the getChildByName is recursive at all.
> 
> And if you are creating the rich text editor on teh fly, why not just 
> pass the reference to it?
> 
> --Scott
> 
> --- In [email protected], "Nate Pearson" <napearson99@> 
> wrote:
> >
> > I am calling a webservice to get text for an item(RichTextEditor) that
> > I am adding dynamically.
> > 
> > If i set the ID of the rte to "item1" how do I reference that in my
> > webservice handler?  I have the string pass through so that the
> > handler knows that the ID should be item1.
> > 
> > I've tried:
> > RichTextEditor("item1").htmlText = "TEST"
> > 
> > and
> > 
> > RichTextEditor(this.getChildByName("item1")).htmlText = "TEST"
> > 
> > but neither work.  Any help is greatly appreciated.
> >
>


Reply via email to