You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Gowtham S <Go...@ramco.com> on 2015/03/12 12:32:07 UTC

Spark Label get Truncated after + symbol even it have enough width to render.

Dear All,
           Anyone have any idea why label truncation happen after it identifies a + symbol ?

<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
        >
    <s:layout>
        <s:VerticalLayout/>
    </s:layout>

    <s:VGroup width="350">
        <s:Button id="button" width="100%"
                   content="jkqUP+e8Cu62ALgLjkqUPea8Cu62ALgLjkqUPea.aa8Cu62ALgLjkqUPe8Cu62ALgLjkqUPea8C"/>
        <s:Label maxDisplayedLines="1" text="jkqUP+e8Cu62ALgLjkqUPea8Cu62ALgLjkqUPea.aa8Cu62ALgLjkqUPe8Cu62ALgLjkqUPea8C" width="100%" />
    </s:VGroup>
</s:Application>

PFA the attached screenshot.

ORIGINAL POST :
http://stackoverflow.com/questions/29003095/spark-label-truncating-issue-spark-label-text-becomes-truncated-if-there-is-pl

Thanks

Regards,
Gowtham S

DISCLAIMER: Information contained in and transmitted by this e-mail is proprietary to Ramco Systems Limited and/or its parents, subsidiaries and other affiliates, including Ramco Systems Corporation, (collectively "Ramco Systems"), is a confidential communication between Ramco Systems and the intended recipient(s) and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If this is a forwarded message, the content of this e-mail may not have been sent with the authority of Ramco Systems. Any unauthorized disclosure, dissemination, forwarding, printing, copying or other use of this email, and/or any action taken in reliance on the contents of this e-mail is strictly prohibited and may be unlawful. Ramco Systems shall not be liable or responsible to an unintended recipient of this email in any way for the contents of this email, or for the consequences of any such use or action. If you have received this communication in error, either directly or through forwarding, please notify Ramco Systems immediately at mailadmin@ramco.com and delete/destroy this email and any copies of this email. In the absence of a consistent formal hard copy or electronic contract or waiver or other instrument duly executed on behalf of Ramco Systems by duly authorized officer(s) or agent(s), Ramco Systems shall not be contractually bound by any email sent on its behalf. Emails will be used by Ramco Systems only for making proposals, conducting negotiations, providing information and positions on issues and for similar purposes.

RE: Spark Label get Truncated after + symbol even it have enough width to render.

Posted by Gowtham S <Go...@ramco.com>.
I tried that too("\u002B" and also HTML encode "&#43;" ), but I get the same behavior.
When I try setting the lineBreak="explicit" it is working fine for label but for button text is truncated at the front.

What I gave is this
"ABCjkqUP+e8Cu62ALgLjkqUPea8Cu62ALgLjkqUPea.aa8Cu6 "

 but what I get is
". BCjkqUP+e8Cu62ALgLjkqUPea8Cu62ALgLjkqUPea.aa8..."

PFA the attached Screenshot.

CODE:

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
   xmlns:s="library://ns.adobe.com/flex/spark"
   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
<fx:Style>
@namespace s "library://ns.adobe.com/flex/spark";
@namespace mx "library://ns.adobe.com/flex/mx";
s|Button s|Label
{
lineBreak:explicit;
}
</fx:Style>
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>


<s:VGroup width="350" left="50">
<s:Button id="button" width="100%"
  content="ABCjkqUP+e8Cu62ALgLjkqUPea8Cu62ALgLjkqUPea.aa8Cu6"/>
<s:Label maxDisplayedLines="1" lineBreak="explicit" text="jas&#43;kqUPe8Cu62ALgLjkqUPea8Cu62ALgLjkqUPea.aa8Cu62ALgLjkqUPe8Cu62ALgLjkqUPea8C" width="100%" backgroundColor="Red"/>
</s:VGroup>

</s:Application>


Thanks

Regards,
Gowtham S

-----Original Message-----
From: kevin.godell [mailto:kevin.godell@gmail.com]
Sent: Thursday, March 12, 2015 5:15 PM
To: dev@flex.apache.org
Subject: Re: Spark Label get Truncated after + symbol even it have enough width to render.

Have you tried using the unicode for plus sign, \u002B? This may be a temp workaround for you.



--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/Spark-Label-get-Truncated-after-symbol-even-it-have-enough-width-to-render-tp45508p45510.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.
DISCLAIMER: Information contained in and transmitted by this e-mail is proprietary to Ramco Systems Limited and/or its parents, subsidiaries and other affiliates, including Ramco Systems Corporation, (collectively "Ramco Systems"), is a confidential communication between Ramco Systems and the intended recipient(s) and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If this is a forwarded message, the content of this e-mail may not have been sent with the authority of Ramco Systems. Any unauthorized disclosure, dissemination, forwarding, printing, copying or other use of this email, and/or any action taken in reliance on the contents of this e-mail is strictly prohibited and may be unlawful. Ramco Systems shall not be liable or responsible to an unintended recipient of this email in any way for the contents of this email, or for the consequences of any such use or action. If you have received this communication in error, either directly or through forwarding, please notify Ramco Systems immediately at mailadmin@ramco.com and delete/destroy this email and any copies of this email. In the absence of a consistent formal hard copy or electronic contract or waiver or other instrument duly executed on behalf of Ramco Systems by duly authorized officer(s) or agent(s), Ramco Systems shall not be contractually bound by any email sent on its behalf. Emails will be used by Ramco Systems only for making proposals, conducting negotiations, providing information and positions on issues and for similar purposes.

Re: Spark Label get Truncated after + symbol even it have enough width to render.

Posted by Alex Harui <ah...@adobe.com>.

On 3/13/15, 6:45 AM, "Gowtham S" <Go...@ramco.com> wrote:

>Thanks Alex for the quick reply, actual that’s a stack overflow question
>I found it interesting so I dropped here.
>Practical application may be possible, is that an issue in player ? if so
>will Adobe can be fix this when someone update in JIRA?

Hard to say if it is intended behavior or not.  Feel free to build a
non-Flex, ActionScript-only test case and file it against Adobe’s
bugbase.adobe.com.  Adobe doesn’t follow Apache Flex mailing lists or
Apache’s JIRA.

They might just say that is intentional, in which case our truncation code
will have to become smarter.

-Alex


RE: Spark Label get Truncated after + symbol even it have enough width to render.

Posted by Gowtham S <Go...@ramco.com>.
Thanks Alex for the quick reply, actual that’s a stack overflow question I found it interesting so I dropped here.
Practical application may be possible, is that an issue in player ? if so will Adobe can be fix this when someone update in JIRA?


Thanks

Regards,
Gowtham S


-----Original Message-----
From: Alex Harui [mailto:aharui@adobe.com]
Sent: Friday, March 13, 2015 3:32 AM
To: dev@flex.apache.org
Subject: Re: Spark Label get Truncated after + symbol even it have enough width to render.

I took a quick look.  It appears that the Flash Player breaks the string into two lines at any punctuation symbol (I tried $, not just +) if there is no whitespace to break lines on.  But other APIs about word boundaries don’t recognize the punctuation as a word boundary and that messes up the truncation algorithm.

I can’t think of any easy workarounds.  What is the practical application for having a + and a label that needs truncation?

-Alex

On 3/12/15, 5:16 AM, "Gowtham S" <Go...@ramco.com> wrote:

>Screen shots added
>
>Before setting the lineBreak
>
>http://apaste.info/SNH
>
>After Setting the lineBreak="explicit"
>
>http://apaste.info/XMc
>
>
>Thanks
>
>Regards,
>Gowtham S
>
>
>-----Original Message-----
>From: kevin.godell [mailto:kevin.godell@gmail.com]
>Sent: Thursday, March 12, 2015 5:15 PM
>To: dev@flex.apache.org
>Subject: Re: Spark Label get Truncated after + symbol even it have
>enough width to render.
>
>Have you tried using the unicode for plus sign, \u002B? This may be a
>temp workaround for you.
>
>
>
>--
>View this message in context:
>http://apache-flex-development.2333347.n4.nabble.com/Spark-Label-get-Tr
>unc
>ated-after-symbol-even-it-have-enough-width-to-render-tp45508p45510.htm
>l Sent from the Apache Flex Development mailing list archive at
>Nabble.com.
>DISCLAIMER: Information contained in and transmitted by this e-mail is
>proprietary to Ramco Systems Limited and/or its parents, subsidiaries
>and other affiliates, including Ramco Systems Corporation,
>(collectively "Ramco Systems"), is a confidential communication between
>Ramco Systems and the intended recipient(s) and is intended for use
>only by the individual or entity to which it is addressed, and may
>contain information that is privileged, confidential or exempt from
>disclosure under applicable law. If this is a forwarded message, the
>content of this e-mail may not have been sent with the authority of
>Ramco Systems. Any unauthorized disclosure, dissemination, forwarding,
>printing, copying or other use of this email, and/or any action taken
>in reliance on the contents of this e-mail is strictly prohibited and
>may be unlawful. Ramco Systems shall not be liable or responsible to an
>unintended recipient of this email in any way for the contents of this
>email, or for the consequences of any such use or action. If you have
>received this communication in error, either directly or through
>forwarding, please notify Ramco Systems immediately at
>mailadmin@ramco.com and delete/destroy this email and any copies of
>this email. In the absence of a consistent formal hard copy or
>electronic contract or waiver or other instrument duly executed on
>behalf of Ramco Systems by duly authorized
>officer(s) or agent(s), Ramco Systems shall not be contractually bound
>by any email sent on its behalf. Emails will be used by Ramco Systems
>only for making proposals, conducting negotiations, providing
>information and positions on issues and for similar purposes.

DISCLAIMER: Information contained in and transmitted by this e-mail is proprietary to Ramco Systems Limited and/or its parents, subsidiaries and other affiliates, including Ramco Systems Corporation, (collectively "Ramco Systems"), is a confidential communication between Ramco Systems and the intended recipient(s) and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If this is a forwarded message, the content of this e-mail may not have been sent with the authority of Ramco Systems. Any unauthorized disclosure, dissemination, forwarding, printing, copying or other use of this email, and/or any action taken in reliance on the contents of this e-mail is strictly prohibited and may be unlawful. Ramco Systems shall not be liable or responsible to an unintended recipient of this email in any way for the contents of this email, or for the consequences of any such use or action. If you have received this communication in error, either directly or through forwarding, please notify Ramco Systems immediately at mailadmin@ramco.com and delete/destroy this email and any copies of this email. In the absence of a consistent formal hard copy or electronic contract or waiver or other instrument duly executed on behalf of Ramco Systems by duly authorized officer(s) or agent(s), Ramco Systems shall not be contractually bound by any email sent on its behalf. Emails will be used by Ramco Systems only for making proposals, conducting negotiations, providing information and positions on issues and for similar purposes.

Re: Spark Label get Truncated after + symbol even it have enough width to render.

Posted by Alex Harui <ah...@adobe.com>.
I took a quick look.  It appears that the Flash Player breaks the string
into two lines at any punctuation symbol (I tried $, not just +) if there
is no whitespace to break lines on.  But other APIs about word boundaries
don’t recognize the punctuation as a word boundary and that messes up the
truncation algorithm.

I can’t think of any easy workarounds.  What is the practical application
for having a + and a label that needs truncation?

-Alex

On 3/12/15, 5:16 AM, "Gowtham S" <Go...@ramco.com> wrote:

>Screen shots added
>
>Before setting the lineBreak
>
>http://apaste.info/SNH
>
>After Setting the lineBreak="explicit"
>
>http://apaste.info/XMc
>
>
>Thanks
>
>Regards,
>Gowtham S
>
>
>-----Original Message-----
>From: kevin.godell [mailto:kevin.godell@gmail.com]
>Sent: Thursday, March 12, 2015 5:15 PM
>To: dev@flex.apache.org
>Subject: Re: Spark Label get Truncated after + symbol even it have enough
>width to render.
>
>Have you tried using the unicode for plus sign, \u002B? This may be a
>temp workaround for you.
>
>
>
>--
>View this message in context:
>http://apache-flex-development.2333347.n4.nabble.com/Spark-Label-get-Trunc
>ated-after-symbol-even-it-have-enough-width-to-render-tp45508p45510.html
>Sent from the Apache Flex Development mailing list archive at Nabble.com.
>DISCLAIMER: Information contained in and transmitted by this e-mail is
>proprietary to Ramco Systems Limited and/or its parents, subsidiaries and
>other affiliates, including Ramco Systems Corporation, (collectively
>"Ramco Systems"), is a confidential communication between Ramco Systems
>and the intended recipient(s) and is intended for use only by the
>individual or entity to which it is addressed, and may contain
>information that is privileged, confidential or exempt from disclosure
>under applicable law. If this is a forwarded message, the content of this
>e-mail may not have been sent with the authority of Ramco Systems. Any
>unauthorized disclosure, dissemination, forwarding, printing, copying or
>other use of this email, and/or any action taken in reliance on the
>contents of this e-mail is strictly prohibited and may be unlawful. Ramco
>Systems shall not be liable or responsible to an unintended recipient of
>this email in any way for the contents of this email, or for the
>consequences of any such use or action. If you have received this
>communication in error, either directly or through forwarding, please
>notify Ramco Systems immediately at mailadmin@ramco.com and
>delete/destroy this email and any copies of this email. In the absence of
>a consistent formal hard copy or electronic contract or waiver or other
>instrument duly executed on behalf of Ramco Systems by duly authorized
>officer(s) or agent(s), Ramco Systems shall not be contractually bound by
>any email sent on its behalf. Emails will be used by Ramco Systems only
>for making proposals, conducting negotiations, providing information and
>positions on issues and for similar purposes.


RE: Spark Label get Truncated after + symbol even it have enough width to render.

Posted by Gowtham S <Go...@ramco.com>.
Screen shots added

Before setting the lineBreak

http://apaste.info/SNH

After Setting the lineBreak="explicit"

http://apaste.info/XMc


Thanks

Regards,
Gowtham S


-----Original Message-----
From: kevin.godell [mailto:kevin.godell@gmail.com]
Sent: Thursday, March 12, 2015 5:15 PM
To: dev@flex.apache.org
Subject: Re: Spark Label get Truncated after + symbol even it have enough width to render.

Have you tried using the unicode for plus sign, \u002B? This may be a temp workaround for you.



--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/Spark-Label-get-Truncated-after-symbol-even-it-have-enough-width-to-render-tp45508p45510.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.
DISCLAIMER: Information contained in and transmitted by this e-mail is proprietary to Ramco Systems Limited and/or its parents, subsidiaries and other affiliates, including Ramco Systems Corporation, (collectively "Ramco Systems"), is a confidential communication between Ramco Systems and the intended recipient(s) and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If this is a forwarded message, the content of this e-mail may not have been sent with the authority of Ramco Systems. Any unauthorized disclosure, dissemination, forwarding, printing, copying or other use of this email, and/or any action taken in reliance on the contents of this e-mail is strictly prohibited and may be unlawful. Ramco Systems shall not be liable or responsible to an unintended recipient of this email in any way for the contents of this email, or for the consequences of any such use or action. If you have received this communication in error, either directly or through forwarding, please notify Ramco Systems immediately at mailadmin@ramco.com and delete/destroy this email and any copies of this email. In the absence of a consistent formal hard copy or electronic contract or waiver or other instrument duly executed on behalf of Ramco Systems by duly authorized officer(s) or agent(s), Ramco Systems shall not be contractually bound by any email sent on its behalf. Emails will be used by Ramco Systems only for making proposals, conducting negotiations, providing information and positions on issues and for similar purposes.

Re: Spark Label get Truncated after + symbol even it have enough width to render.

Posted by "kevin.godell" <ke...@gmail.com>.
Have you tried using the unicode for plus sign, \u002B? This may be a temp
workaround for you.



--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/Spark-Label-get-Truncated-after-symbol-even-it-have-enough-width-to-render-tp45508p45510.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.