[ 
https://issues.apache.org/jira/browse/FLEX-34013?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13969757#comment-13969757
 ] 

Marcus Wilkinson commented on FLEX-34013:
-----------------------------------------

Here is a patch to prevent the RTE. It will just fail in pasting content which 
would have otherwise crashed. I would not recommend this for production use:

{code}
### Eclipse Workspace Patch 1.0
#P FlexSDK
Index: 
frameworks/projects/textLayout/src/flashx/textLayout/edit/TextClipboard.as
===================================================================
--- frameworks/projects/textLayout/src/flashx/textLayout/edit/TextClipboard.as  
(revision 22396)
+++ frameworks/projects/textLayout/src/flashx/textLayout/edit/TextClipboard.as  
(working copy)
@@ -176,6 +176,7 @@
                                importer.useClipboardAnnotations = true;
                                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. */
@@ -183,6 +184,7 @@
                                        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)

{code}

> RTE at TextClipboard#importToScrap()
> ------------------------------------
>
>                 Key: FLEX-34013
>                 URL: https://issues.apache.org/jira/browse/FLEX-34013
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: Spark: RichEditableText
>    Affects Versions: Apache Flex 4.11.0
>         Environment: Windows 7
>            Reporter: Shigeru Nakagaki
>         Attachments: TextScrap.fxp
>
>
> This problem should be related with FLEX-33988.
> However,  I guess this is not same problem exactly.
> I can not reproduce this RTE. But it's happened.
> thanks
>  TypeError: Error #1009
>       at 
> flashx.textLayout.edit::TextClipboard$/http://ns.adobe.com/textLayout/internal/2008::importToScrap()
>       at 
> spark.components::RichEditableText/textContainerManager_flowOperationBeginHandler()
>       at flash.events::EventDispatcher/dispatchEvent()
>       at flashx.textLayout.container::TextContainerManager/dispatchEvent()
>       at flash.events::EventDispatcher/dispatchEvent()
>       at flashx.textLayout.elements::TextFlow/dispatchEvent()
>       at flashx.textLayout.edit::EditManager/doInternal()
>       at flashx.textLayout.edit::EditManager/doOperation()
>       at flashx.textLayout.edit::EditManager/pasteTextScrap()
>       at flashx.textLayout.edit::EditManager/editHandler()
>       at flashx.textLayout.container::ContainerController/editHandler()
>       at flashx.textLayout.container::TextContainerManager/editHandler()
>       at flash.desktop::NativeApplication/_onKeyDownBubble()



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

Reply via email to