Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 705773
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T04:05:28+00:00 2026-05-14T04:05:28+00:00

I’m having a problem displaying data from a function to text box within a

  • 0

I’m having a problem displaying data from a function to text box within a tab.
If you run the code and click “Select Tab 2 and Fill…” I get an error;
“TypeError: Error #1009: Cannot access a property or method of a null object reference.”
I’m guessing this is because “Tab 2” is/was not rendered yet. Now if I run the code,
select “Tab 2” then select “Tab 1” and click “Select Tab 2 and Fill…” it works
the way I would like. Dose any one know a way around this problem.

—-Full Flex 4/Flash Builder Code just copy paste—-

<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" 
                       xmlns:s="library://ns.adobe.com/flex/spark" 
                       xmlns:mx="library://ns.adobe.com/flex/halo"
                       creationComplete=" ">    
    <fx:Script>
        <![CDATA[           
            public function showtab2():void
            {
                mytextbox.text="I made it!";
                tn.selectedIndex=1;
            }
        ]]>
    </fx:Script>
    <fx:Declarations>
        <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>
    <mx:Panel title="TabNavigator Container Example" height="90%" width="90%" 
              paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10">

        <mx:Label width="100%" color="blue"
                  text="Select the tabs to change the panel."/>

        <mx:TabNavigator id="tn"  width="100%" height="100%">
            <!-- Define each panel using a VBox container. -->

            <mx:VBox label="Panel 1">
                <mx:Label text="TabNavigator container panel 1"/>
                <mx:Button label="Select Tab 2 and Fill with Text" click="showtab2()"/>
            </mx:VBox>

            <mx:VBox label="Panel 2">
                <mx:Label text="TabNavigator container panel 2"/>
                <s:TextInput id="mytextbox" />
            </mx:VBox>

        </mx:TabNavigator>

        <mx:HBox>
        </mx:HBox>

    </mx:Panel>

</s:WindowedApplication>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T04:05:28+00:00Added an answer on May 14, 2026 at 4:05 am

    You can change the render-behavior of a tabnavigator (or any other multiple-views-container) with the creationPolicy-property.

    Default value of this property is ‘auto’ (only create when needed), but you can set it to ‘all’ to create every child inside the tabnavigator at the start.

    Beware that this may result in a performance problem. More on this can be found at: http://livedocs.adobe.com/flex/3/html/help.html?content=layoutperformance_05.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a text area in my form which accepts all possible characters from
I am currently running into a problem where an element is coming back from
I want to construct a data frame in an Rcpp function, but when I
I have a bunch of posts stored in text files formatted in yaml/textile (from
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I have this code to decode numeric html entities to the UTF8 equivalent character.
I would like to run a str_replace or preg_replace which looks for certain words

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.