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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T18:06:21+00:00 2026-05-24T18:06:21+00:00

I’m getting a strange exception from s:Label in Flex 4.1. I have a parent

  • 0

I’m getting a strange exception from s:Label in Flex 4.1. I have a parent (extending BorderContainer) which has a s:Label in it.

In the parent constructor I have:

label = new Label();
label.setStyle("color", "Red");
label.setStyle("fontSize", 20);

Later the label’s text (only on character) is set, it is positioned and added with addElement(). Everything was OK until I started implementing resizing of the parent component. In order to place the label on the correct location, I moved its positioning to updateDisplayList():

override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
{
        super.updateDisplayList(unscaledWidth, unscaledHeight);

        ...

        label.x = width - 10;
        label.y = height - 10;
}

When resizing the parent, if the size becomes too small, I get the following exception:

ReferenceError: Error #1069: Property -1 not found on __AS3__.vec.Vector.<flash.display::DisplayObject> and there is no default value.
at spark.components::Label/truncateText()[E:\dev\4.x\frameworks\projects\spark\src\spark\components\Label.as:1246]
at spark.components::Label/http://www.adobe.com/2006/flex/mx/internal::composeTextLines()[E:\dev\4.x\frameworks\projects\spark\src\spark\components\Label.as:485]
at spark.components.supportClasses::TextBase/updateDisplayList()[E:\dev\4.x\frameworks\projects\spark\src\spark\components\supportClasses\TextBase.as:684]
at mx.core::UIComponent/validateDisplayList()[E:\dev\4.x\frameworks\projects\framework\src\mx\core\UIComponent.as:8709]
at mx.managers::LayoutManager/validateDisplayList()[E:\dev\4.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:663]
at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:736]
at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\4.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:1072]

As I said, the label contains only one character and I don’t need any truncation. Furthermore, when I get the exception, there is still some blank space for the label.

I tried :

label.maxDisplayedLines = 1;

But this didn’t solve the problem. I’ve even tried falling back to the mx Label and setting truncateToFit to false, but I get the same exception when making the parent too small.

Any ideas will be appreciated. Thanks in advance! 🙂

Update:
I’ve tested this with a Group-based custom component and the problem persists. The strange thing is that if I remove the label with removeElement() in the start of the resize operation, I get the same exception. This is valid even if I set the label reference to null, hoping to have it garbage collected.

  • 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-24T18:06:22+00:00Added an answer on May 24, 2026 at 6:06 pm

    Is there a reason you’re not setting your label as being right="10" instead? It’s a style so you’ll need to set it like that. It’ll work as long as your parent is using absolute layout.

    As for the truncate text, I do believe there is a way to disable that (probably truncate=”false”);

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

Sidebar

Related Questions

I have a text area in my form which accepts all possible characters from
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a bunch of posts stored in text files formatted in yaml/textile (from
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text

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.