Post your code. Maybe we can help. ~randy
_____ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of anthony_morsey Sent: Saturday, January 12, 2008 9:05 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Accessing objects within objects within objects... ??? Its actually one level deeper. TabNavigator-->Canvas->-Canvas->Text I get a runtime error - "TypeError: Error #1009: Cannot access a property or method of a null object reference." on the line that I ref that text object. --- In HYPERLINK "mailto:flexcoders%40yahoogroups.com"[EMAIL PROTECTED], "Randy Martin" <[EMAIL PROTECTED]> wrote: > > I'm assuming you mean that you have a TextInput on the canvas. So you have > something like this: > > <mx:TabNavigator id="tabNav"> > <mx:Panel id="tab1_panel"-> > <mx:Canvas id="myCanvas"-> > <mx:TextInput id="myText"/-> > </mx:Canvas> > </mx:Panel> > </mx:TabNavigator> > > So, you can get to the text input from anywhere in the component like this: > > this.myText.-text = "some string"; > > ~randy > > > _____ > > From: HYPERLINK "mailto:flexcoders%40yahoogroups.com"[EMAIL PROTECTED] [mailto:HYPERLINK "mailto:flexcoders%40yahoogroups.com"[EMAIL PROTECTED] On > Behalf Of anthony_morsey > Sent: Friday, January 11, 2008 10:22 AM > To: HYPERLINK "mailto:flexcoders%40yahoogroups.com"[EMAIL PROTECTED] > Subject: [flexcoders] Accessing objects within objects within objects... ??? > > > > I have a the following object hierarchy: > > TabNavigator > tab1_panel (first tab in series of 4) > myCanvas (canvas in the first tab) > myText (text control within the above canvas) > > How do I change the text value of myText in the above example? > > Before I added the second canvas above (myCanvas), I could do the > following to change the text value: > Object(tab1_--panel.getChildB-y-Name("myText"--)).text = "Tony"; > > Thanks > > Tony > > > > > > > No virus found in this outgoing message. > Checked by AVG. > Version: 7.5.516 / Virus Database: 269.19.0/1218 - Release Date: 1/10/2008 > 1:32 PM > No virus found in this outgoing message. Checked by AVG. Version: 7.5.516 / Virus Database: 269.19.1/1220 - Release Date: 1/11/2008 6:09 PM