RE: [flexcoders] Re: Accessing objects within objects within objects... ???

2008-01-12 Thread Randy Martin
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
 


Re: [flexcoders] Re: Accessing objects within objects within objects... ???

2008-01-12 Thread Alger Werft
Mayby it's due to the creationPolicy.

Alger

Randy Martin wrote:
 
 
 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 flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com, 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: flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com] On
   Behalf Of anthony_morsey
   Sent: Friday, January 11, 2008 10:22 AM
   To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
   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.getChildBy-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
 
 


--
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/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* 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/
 


Re: [flexcoders] Re: Accessing objects within objects within objects... ???

2008-01-12 Thread yiğit boyar
tab1_panel.getChildren()[0].myText,text= dsa;
if it gives a compile time error; try
(tab1_panel.getChildren()[0] as Object).myText,text= dsa;

On Jan 12, 2008 7:11 PM, Alger Werft [EMAIL PROTECTED] wrote:

 Mayby it's due to the creationPolicy.

 Alger

 Randy Martin wrote:
 
 
  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 flexcoders@yahoogroups.com
  mailto:flexcoders%40yahoogroups.com, 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: flexcoders@yahoogroups.com
  mailto:flexcoders%40yahoogroups.com
  [mailto:flexcoders@yahoogroups.com
  mailto:flexcoders%40yahoogroups.com] On
Behalf Of anthony_morsey
Sent: Friday, January 11, 2008 10:22 AM
To: flexcoders@yahoogroups.com mailto:
 flexcoders%40yahoogroups.com
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.getChildBy-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
 
 


 --
 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