title: Flex ; get the value of RadioButton inside a FormItem
body: <p>I'm working on Flash Builder with latest flex SDK.</p>
  
  <p>I have a problem getting the value radioButton of the selceted radio button inside a form:</p>
  
  <pre><code>&lt;mx:Form id="form_new_contribution"&gt; 
   &lt;mx:FormItem label="Contribution type" includeIn="project_contributions"&gt;
    &lt;mx:RadioButtonGroup id="myG" enabled="true" /&gt;
    &lt;mx:RadioButton id="subtitle" label="subtitle" groupName="{myG}" value="subtitle"/&gt;
    &lt;mx:RadioButton id="note" label="notes / chapters" groupName="{myG}" value="note"/&gt;
   &lt;/mx:FormItem&gt;
  &lt;/mx:Form&gt;
  </code></pre>
  
  <p>the function is:</p>
  
  <pre><code>protected function button_add_new_clickHandler(event:MouseEvent):void{
   Alert.show(myG.selectedValue.toString());
  }
  </code></pre>
  
  <p>I tried also:</p>
  
  <pre><code>Alert.show(myG.selection.toString());
  </code></pre>
  
  <p>bothe codes show error:</p>
  
  <pre><code>TypeError: Error #1009: Cannot access a property or method of a null object reference.
  </code></pre>
  
  <p>and if It only works if I put :</p>
  
  <pre><code>Alert.show(myG.toString());
  </code></pre>
  
  <p>it alerts : Object RadioButtonGroup</p>
  
  <p>thanx for any hints, and sorry for the long message :)</p>