title: Set dataprovider of buttonbar component
body: <p>I am trying to add a navigation component with a button bar in it that controls the view stack of the main application. Here is what I have so far for the main application's code:</p>
  
  <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt;
      &lt;s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
                 xmlns:s="library://ns.adobe.com/flex/spark" 
                 xmlns:mx="library://ns.adobe.com/flex/mx" 
                 xmlns:comps="comps.*" minWidth="955" minHeight="600"&gt;
      &lt;fx:Declarations&gt;
          &lt;!-- Place non-visual elements (e.g., services, value objects) here --&gt;
      &lt;/fx:Declarations&gt;
      &lt;fx:Script&gt;
          &lt;![CDATA[
              [Bindable]
              public var myViewStack:ViewStack;;
          ]]&gt;
      &lt;/fx:Script&gt;
      &lt;fx:Binding source="lgViewStack" destination="myViewStack"/&gt;
  
      &lt;comps:viewControl id="myControl" width="935" horizontalCenter="0" top="5" height="134"/&gt;
      &lt;mx:ViewStack id="lgViewStack" width="935" height="474" left="10" verticalCenter="66"&gt;
          &lt;s:NavigatorContent label="View 1" width="100%" height="100%" id="view1"&gt;
              &lt;s:Panel id="firstPanel" title="First Panel" width="250" height="200" horizontalCenter="0" verticalCenter="0" &gt;
              &lt;/s:Panel&gt;
          &lt;/s:NavigatorContent&gt;
          &lt;s:NavigatorContent label="View 2" width="100%" height="100%" id="view2"&gt;
              &lt;s:Panel id="secondView" title="Second View" width="250" height="200" horizontalCenter="0" verticalCenter="0" &gt;
              &lt;/s:Panel&gt;
          &lt;/s:NavigatorContent&gt;
      &lt;/mx:ViewStack&gt;
  &lt;/s:Application&gt;
  </code></pre>
  
  <p>And the component code:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;s:Group xmlns:fx="http://ns.adobe.com/mxml/2009" 
           xmlns:s="library://ns.adobe.com/flex/spark" 
           xmlns:mx="library://ns.adobe.com/flex/mx" width="400" height="300"&gt;
      &lt;fx:Declarations&gt;
          &lt;!-- Place non-visual elements (e.g., services, value objects) here --&gt;
      &lt;/fx:Declarations&gt;
  
  
      &lt;s:ButtonBar x="170" y="10" width="58" dataProvider="{myViewStack}"/&gt;
  &lt;/s:Group&gt;
  </code></pre>
  
  <p>I receive a compile error from the component: Access of undefined property myViewStack. Am I referencing the variable myViewStack incorrectly? I am still trying to understand how bindings work.</p>