When attempting to assign a dataProvider to a DataGrid...
reportProjects.dataProvider = rptProjects;

I get the following error...
Cannot access a property or method of a null object reference.

The only difference between this DataGrid, and one that is properly
instantiated is that its on a Canvas that's not visible when the
application starts.  The statement happens after creationComplete, which
I thought was the event that got fired after all objects were created.

creationComplete() > initApp() > loadProjects() > {problem statement}


Condensed version of design

<mx:ViewStack>
    <mx:Canvas label="Data">
       ...
    </mx:Canvas>
    <mx:Canvas label="Reports">
       ...
       <mx:DataGrid id="reportProjects">
          ...
       </mx:DataGrid>
    </mx:Canvas>
</mx:ViewStack


I can't figure out why this DataGrid isn't getting instantiated, or how
to ensure it does.  Any help is greatly appreciated.

- Steve

Reply via email to