2 Replies Latest reply on Oct 11, 2007 10:54 AM by braseth

    Component Error - Help!

    braseth
      My main mxml file is getting big, so I wanted to break chunks of code into components. I took a tabnavigator, which references a datagrid, and made that into a component. When I compile, the component has the error "Access of undefined property DGuserRequest".

      DGuserRequest exists in the main mxml file.

      How do I fix this problem? I'm not really sure what is going on.

      MAIN:
      <mx:DataGrid id="dgUserRequest" dataProvider="{userRequest.lastResult.users.user}" >
      <mx:columns>
      <mx:DataGridColumn headerText="Effdt" dataField="effdt" width="100" />
      </mx:columns>
      </mx:DataGrid>

      <comp:tab_navigator/>


      COMPONENT

      <mx:TabNavigator....
      .......
      <mx:Label text="{dgUserRequest.selectedItem.effdt}"/>
      .........
      </mx:TabNavigator>