title: Is it safe to use a component reference in mxml
body: <p>Consider the following radio button example.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"&gt;
  &lt;mx:Script&gt;
  &lt;![CDATA[
      private function getRb1():RadioButton {
          trace(rb1 == null);
          return rb1;                     
      }   
  ]]&gt;
   &lt;/mx:Script&gt;
  &lt;mx:VBox&gt;
      &lt;mx:RadioButtonGroup **id="rbg" selection="{getRb1()}**"/&gt;      
      &lt;mx:RadioButton id="rb1" label="Radio Button 1" /&gt;
      &lt;mx:RadioButton id="rb2" label="Radio Button 2" /&gt;
      &lt;mx:RadioButton id="rb3" label="Radio Button 3" /&gt;
  &lt;/mx:VBox&gt;  
   &lt;/mx:Application&gt;
  </code></pre>
  
  <p>The problem is that I can not refer to rb1 while defining RadioButtonGroup, rb1 is null at that time, but i can use the selectedValue to set the initial selction. </p>
  
  <p>I was just wondering is this some special case or its not safe to refer to components in mxml in general.</p>
  
  <p>Thanks,</p>