flex-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Justin Mclean (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (FLEX-34407) a bug of TextClipboard#importToScrap()
Date Wed, 16 Jul 2014 23:41:05 GMT

     [ https://issues.apache.org/jira/browse/FLEX-34407?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Justin Mclean updated FLEX-34407:
---------------------------------

    Labels: easyfix  (was: )

> a bug of TextClipboard#importToScrap()
> --------------------------------------
>
>                 Key: FLEX-34407
>                 URL: https://issues.apache.org/jira/browse/FLEX-34407
>             Project: Apache Flex
>          Issue Type: Bug
>    Affects Versions: Apache Flex 4.11.0
>         Environment: Windows 7 64bit Japanese, AIR 14, Apache Flex SDK 4.11.0
>            Reporter: Shigeru Nakagaki
>              Labels: easyfix
>
> We got an exception at TextClipboard#importToScrap() but I can not reproduce.
>  TypeError: Error #1009
>  	at flashx.textLayout.edit::TextClipboard$/http://ns.adobe.com/textLayout/internal/2008::importToScrap()
>  	at flashx.textLayout.edit::TextClipboard$/http://ns.adobe.com/textLayout/internal/2008::importScrap()
>  	at flashx.textLayout.edit::TextClipboard$/getContents()
>  	at flashx.textLayout.edit::EditManager/editHandler()
>  	at flashx.textLayout.container::ContainerController/editHandler()
>  	at flashx.textLayout.container::TextContainerManager/editHandler()
>  	at flash.desktop::NativeApplication/_onKeyDownBubble()
> So I looked into the code and I guess I found a wrong logic.
> Here is the code of TextClipboard#importToScrap().
> /**---------+---------+---------+---------+---------+---------+---------+*/
> var textFlow:TextFlow = importer.importToFlow(textOnClipboard);
> if (textFlow)
> 	textScrap = new TextScrap(textFlow);
> /** Hint to the scrap about whether text is plain or formatted. If not set, scrap will
inspect text for attributes. */
> if (format == TextConverter.PLAIN_TEXT_FORMAT)
> 	textScrap.setPlainText(true);
> else if (format == TextConverter.TEXT_LAYOUT_FORMAT)
> 	textScrap.setPlainText(false);
> // Backwards compatibility: check for older scrap format
> if (!textScrap && format == TextConverter.TEXT_LAYOUT_FORMAT)
> 	textScrap = importOldTextLayoutFormatToScrap(textOnClipboard);
> /**---------+---------+---------+---------+---------+---------+---------+*/
> The block of "Backwards compatibility: check for older scrap format" should be above
the block of "if (format == TextConverter.PLAIN_TEXT_FORMAT)", right?
> thanks



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message