2012-09-05 2 views
0

좋아, TabNavigator 작업하고 있습니다. 현재 각 탭에 레이블을 채우고 있습니다. 나는 문제없이 ard.text를 채울 수 있습니다. 그러나 다른 모든 레이블은 null로 표시되며 "null 객체 참조의 속성이나 메서드에 액세스 할 수 없습니다"라는 1009 오류가 발생합니다. 거기에 TabNavigator와 함께 할 수있는 것에 빠져있는 뭔가가 있습니까? 참고로 저는 Flex를 처음 사용합니다. 왜 나는 오류가 발생하는지 확실하지 않습니다. 어떤 도움이라도 좋을 것입니다.Null Flex의 참조

<mx:TabNavigator id="tabNavigator" width="100%" height="125" visible="false" includeInLayout="false" creationPolicy="auto"> 
     <mx:VBox id="generalInformation" label="Gen. Info." width="100%" horizontalAlign="center"> 
      <mx:Label id="ard" text=""> </mx:Label> 
      <mx:Label id="bufferDist" text=""/> 
      <mx:HBox paddingBottom="5" > 
       <mx:Button id="googleButton" label="Google Directions" click="newWin('http://www.maps.google.com/?q=' + addressResult)"/> 
       <mx:Button id="mapquestButton" label="MapQuest Directions" click="newWin('https://www.mapquest.com/?q=' + addressResult)"/> 
      </mx:HBox> 
     </mx:VBox> 
     <mx:VBox id="schoolDistrict" label="School District" width="100%"> 
      <mx:Label id="schoolDistrictLabel" text=""> </mx:Label> 
     </mx:VBox> 
     <mx:VBox id="paHouse" label="PA House" width="100%"> 
      <mx:Label id="paHouseLabel" text=""> </mx:Label> 
     </mx:VBox> 
     <mx:VBox id="paSenate" label="PA Senate" width="100%"> 
      <mx:Label id="paSenateLabel" text=""> </mx:Label> 
     </mx:VBox> 
     <mx:VBox id="usHouse" label="US House" width="100%"> 
      <mx:Label id="usHouseLabel" text=""> </mx:Label> 
     </mx:VBox> 
    </mx:TabNavigator> 

답변

1

마음을 알았습니다. creationPolicy를 모두

으로 설정해야했습니다.