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 9001007
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:22:50+00:00 2026-06-16T00:22:50+00:00

I am trying to implement reusable components in flex 3. I have tab navigator

  • 0

I am trying to implement reusable components in flex 3. I have tab navigator which will be dynamic.In the screen i have a button with click operation a tab navigator wiht vbox as child will be created and in vbox i have one textbox which takes input information from user.

I have a show button beside the click button. when a user click show button and if the four tabs are opened we need to put all of the textboxes of the VBox to the Text Area.

here is my code.

 <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">


    <mx:Script>
        <![CDATA[
            import Repeat;
    private var input:String;

    private var i:int=0;
            private function addNextTab(event:Event):void {
                tabs.addChild(new Repeat("Tab"));
            }
            private function show()
            {

                var child:DisplayObject;

            for(i=0;i<tabs.numChildren;i++)
            {


      child=tabs.getChildAt(i);
              input=TextInput(child.getChildAt(0)).text;//error
              textArea.text=textArea.text+input;
            }
            }
        ]]>
    </mx:Script>
    <mx:TabNavigator id="tabs" width="100%" height="100%">

    </mx:TabNavigator>

        <mx:TextArea id="textArea"/>
    <mx:Button label="Add Next Tab" click="addNextTab(event)" />
    <mx:Button label="Show Values" click="show()" />

    </mx:Application>

the one line is showing the errors. I am intial learner on the flex. But i tried to learn and do my own.
here is my Repeat.as

package {
import mx.containers.VBox;
import mx.controls.Label;
import mx.controls.TextInput;

public class Repeat extends VBox {
    public function Repeat(name:String) {
        label = name;


    }

    override protected function createChildren():void {
        super.createChildren();

        var box:VBox = new VBox();
        var t1:TextInput = new TextInput();

        box.addChild(t1);

        addChild(box);
    }
}
}

i have to access the text box information of all the tabs and put it in textArea.

can any body help me.?

BTW: It is flex 3 application.

  • 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-06-16T00:22:51+00:00Added an answer on June 16, 2026 at 12:22 am

    You should make text a public property and don’t create a nested VBox to add it to. You are already extending VBox, so just addChild.. like this:

    package {
        import mx.containers.VBox;
        import mx.controls.Label;
        import mx.controls.TextInput;
    
        public class Repeat extends VBox {
    
            public var text:TextInput;
    
            public function Repeat(name:String) {
                label = name;
            }
    
            override protected function createChildren():void {
                super.createChildren();
                text = new TextInput();
                addChild(text);
            }
        }
    }
    

    EDIT: show to access it.

    child = tabs.getChildAt(i) as Repeat;
    child.text.text = someNewValue;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying implement A* Start path finding in my games(which are written with JavaScript,
I am trying to implement Tim Keating's answer from here: Loading a Reusable UITableViewCell
I am trying to implement Tab View for my activity. I am getting an
Trying to implement what I thought was a simple concept. I have a user
I'm trying to implement the jQuery UI autocomplete combobox so it's reusable in ASP.NET/C#.
Trying to implement a function in my linkedlist class that will return total amount
Currently I'm trying to implement a reusable Twitter status 'poster'. The Twitter status part
I have requirement to create an asp.net wizard control which will be re usable
I am trying to implement an extension method that will work with linq2entities. I
I am trying implement a search activity which gets data from a mysql table

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.