If you are using a TabNavigator control and receive a "Main Thread (Suspended: TypeError: Error #1009: Cannot access a property or method of a null object reference.)" error when accessing the objects within the TabNavigator it is due to the fact that the objects you are accessing are not only not available visually but technical do not exist yet. If you would like them to be created when the TabNavigator is rendered, turn on the createPolicy by adding creationPolicy="all" to the TabNavigator declaration.
In the case below if creationPolicy is not set, accessing extendedDescription.text will cause the error.
<mx:TabNavigator height="141" bottom="5" left="5" right="5" creationPolicy="all" id="tabnavigator1">
<mx:Canvas label="Customer Use Case" width="100%" height="100%">
<mx:TextArea id="useCaseText" wordWrap="true" verticalScrollPolicy="on" editable="false" enabled="true" left="5" right="53" top="5" bottom="5"/>
<mx:Image source="@Embed('../assets/images/zoom.png')" scaleContent="true" autoLoad="true" id="zoomTabs" right="5" top="5" height="40" width="40" click="detailsZoomIn();"/>
</mx:Canvas>
<mx:Canvas label="Engineering Notes" width="100%" height="100%">
<mx:TextArea id="extendedDescription" wordWrap="true" verticalScrollPolicy="on" editable="false" enabled="true" left="5" bottom="5" top="5" right="5"/>
</mx:Canvas>
</mx:TabNavigator>
| < Prev |
|---|
