I have an application which includes a big form. I split the form using a tab NavigatorContent. I cannot access the next form using the top tab button except I created a button on the form so that Once the 1st form is complete and error free it allows the next form to be completed.
I am using 1 actionscript for the entire form. Depending on the Information added by the user to the first form the second form has some fields disabled. I do this in my ActionSctipt when the user is done with the first form and hits the NEXT button. Ones the User hits the NEXT button it disables certain fields in the 2nd Form. I get an error(TypeError: Error #1009: Cannot access a property or method of a null object reference) that I cannot disable or access any fields on the 2nd form at runtime.
How to I fix this problem??
When you get the error it shows you what line of code invoked it. Do you know the line number, cuz that will pinpoint the area it is throwing the exception?
Do you have the button click code, for example?
This error is occurs when you try to access an object which has not been created yet. In a TabNavigator, the children of each tab do not get created until you click on the tab. So, your code is referencing the children of tab #2 before they exist, throwing the error.
You have several options, but you could try having that section of code run after all the children of tab #2 have been created--use the creationComplete() event of Tab #2's Canvas to run the code, or the Tab's CHANGE event.