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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T22:23:01+00:00 2026-05-24T22:23:01+00:00

I have one MXML File as <objecthandles:ObjectHandles xmlns:fx=http://ns.adobe.com/mxml/2009 xmlns:s=library://ns.adobe.com/flex/spark backgroundAlpha=1 xmlns:mx=library://ns.adobe.com/flex/mx allowRotate=true minHeight=25 minWidth=60

  • 0

I have one MXML File as

<objecthandles:ObjectHandles xmlns:fx="http://ns.adobe.com/mxml/2009"                            xmlns:s="library://ns.adobe.com/flex/spark"  backgroundAlpha="1"                            xmlns:mx="library://ns.adobe.com/flex/mx"
allowRotate="true" minHeight="25" minWidth="60" height="100" width="200">

<s:BorderContainer  id="borderCon" width="100%" height="100%" minHeight="25" minWidth="60" 
                        backgroundAlpha="0" borderVisible="false" borderAlpha="0">
         <s:HGroup id="hgText" width="100%" height="100%" gap="0" >
            <mx:TextArea id="txtAdd" width="100%" height="100%" color="black" 
                         minHeight="25" minWidth="60" horizontalScrollPolicy="off" verticalScrollPolicy="off" focusOut="txtAddKeyUpHandler(event)"  
                         keyUp="txtAddMirrorKeyUpHandler(event)"
                         creationComplete="onTextCreationComplete()" />
        </s:HGroup>
</s:BorderContainer>

</objecthandles:ObjectHandles>

When ever i create the object of the Fileas

var txtElement:TextElement = new TextElement();
txtElement.txtAdd.text = “Hello”;

Then it showing the null object reference that
txtElement.txtAdd seems to be null

Need Perfect Solution?

  • 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-24T22:23:02+00:00Added an answer on May 24, 2026 at 10:23 pm

    In the Flex component lifecycle subcomponents will not be created until the parent component is added to the displaylist. Only when the component is added to the displaylist and fully built, will you be able to access its subcomponents. When the component is completely ready for usage, it will dispatch a FlexEvent.CREATION_COMPLETE event.

    So do something like this:

    var txtElement:TextElement = new TextElement();
    txtElement.addEventListener(FlexEvent.CREATION_COMPLETE, initTxtElement);
    addElement(txtElement);
    
    private function initTxtElement(event:FlexEvent):void {
        txtElement.txtAdd.text = "Hello";
    }
    

    Or better yet, since it’s a custom component: expose the ‘text’ property as a property of ‘TextElement’ and handle the deferred setting of the property internally, so that you can write: txtElement.text = "hello".

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

Sidebar

Related Questions

I have a renderer that looks like this: <s:ItemRenderer xmlns:fx=http://ns.adobe.com/mxml/2009 xmlns:s=library://ns.adobe.com/flex/spark xmlns:mx=library://ns.adobe.com/flex/mx autoDrawBackground=true> <s:Group
I have one .mxml file (the Application) with a ViewStack (with 4 views) and
In flex I have a class 'MapDrawingPoint', in one of my mxml files I
I have an MXML file, which references an external script file for all its
I have a datagrid in my mxml file, say, samp.mxml. <mx:DataGrid id=taskDataGrid dataProvider={initDG} variableRowHeight=true
I have two applications in my project 'test' the applications are one.mxml and two.mxml
Have one. Fla (Flash) file that uses ActionScript 1.0. Need to have it in
I have one domain on godaddy (www.mydomain.com). I have placed my cakephp application on
i have one file. it contains fields like this i/p files : a.txt 9842,5003,a,a,100
I have 2 files: Main.mxml with application and one MyObject.as. I create the instance

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.