0
votes

I want to enable a linkbar component. When I run the application and try to look for data into the linkbar I get error 1009: impossible to acess property or method of a null object reference. How can I enable a component in flex so that to avoid error 1009? Any help would be appreciated...

<mx:LinkBar dataProvider="myViewStack" enabled="true"  activate="true"/>
  <mx:ViewStack id = "myViewStack" width="624" height="212" enabled="true">
      <mx:Canvas id="canvas3" label="Financement" enabled="true" >
       <mx:Label x="38" y="10" text="Code Fin."/>
           <mx:Label x="19" y="36" text="Fond propre" enabled="true"/> 
          </mx:Canvas>
 </mx:ViewStack>    
2
What makes you think the LinkBar is not enabled? How are you trying to look for data in the LinkBar? What is the line of code that gives an error 1009? Activate is an event that the LinkBar dispatches; but you are setting it to true. I'm not sure what setting it to true will accomplish.JeffryHouser
When you get that error, there is a line number that tells which line in your code the error occurs on. We can't answer your question because without that line number we can only guess at what is null. Please add the error, and any relevant code with it.Sunil D.

2 Answers

0
votes

Check if "myViewStack" is initialized or not

0
votes
<mx:LinkBar dataProvider="{myViewStack}" enabled="true"/>