Skip navigation
Currently Being Moderated

Error after copy and paste

Jun 17, 2010 1:32 AM

I get this error everytime, if I repeat the following steps:

  1. Type "blabla" into a RichEditableText
  2. Copy "lab"
  3. Insert it after the first "a"
  4. Copy "alabb"
  5. Insert it before the "bb"

 

I know it's kind of silly, but I tried several other combinations and that one seems to be one that works all the time.

 

After this procedure the following error appears:

 

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at flashx.textLayout.edit::TextScrap/clone()[C:\Vellum\branches\v1\1.1\d ev\output\openSource\textLayout\src\flashx\textLayout\edit\TextScrap.a s:239]
at flashx.textLayout.edit::TextFlowEdit$/replaceRange()[C:\Vellum\branch es\v1\1.1\dev\output\openSource\textLayout\src\flashx\textLayout\edit\ TextFlowEdit.as:375]
at flashx.textLayout.operations::PasteOperation/internalDoOperation()[C: \Vellum\branches\v1\1.1\dev\output\openSource\textLayout\src\flashx\te xtLayout\operations\PasteOperation.as:82]
at flashx.textLayout.operations::PasteOperation/doOperation()[C:\Vellum\ branches\v1\1.1\dev\output\openSource\textLayout\src\flashx\textLayout \operations\PasteOperation.as:68]
at flashx.textLayout.edit::EditManager/doInternal()[C:\Vellum\branches\v 1\1.1\dev\output\openSource\textLayout\src\flashx\textLayout\edit\Edit Manager.as:587]
at flashx.textLayout.edit::EditManager/doOperation()[C:\Vellum\branches\ v1\1.1\dev\output\openSource\textLayout\src\flashx\textLayout\edit\Edi tManager.as:462]
at flashx.textLayout.edit::EditManager/pasteTextScrap()[C:\Vellum\branch es\v1\1.1\dev\output\openSource\textLayout\src\flashx\textLayout\edit\ EditManager.as:1376]
at flashx.textLayout.edit::EditManager/editHandler()[C:\Vellum\branches\ v1\1.1\dev\output\openSource\textLayout\src\flashx\textLayout\edit\Edi tManager.as:213]
at flashx.textLayout.container::ContainerController/editHandler()[C:\Vel lum\branches\v1\1.1\dev\output\openSource\textLayout\src\flashx\textLa yout\container\ContainerController.as:2349]
at flashx.textLayout.container::TextContainerManager/editHandler()[C:\Ve llum\branches\v1\1.1\dev\output\openSource\textLayout\src\flashx\textL ayout\container\TextContainerManager.as:1748]
at flash.desktop::NativeApplication/performKeyEquivalent()
at flash.desktop::NativeApplication/_onKeyDownBubble()

 

Is it a bug in the TLF or a problem with my application?

 
Replies
  • Currently Being Moderated
    Jun 17, 2010 10:42 AM   in reply to bchalupka-syPD9H

    I also happened to catch the stack below in the debugger.  I've seen it a few different times and it may be related.  Looks like it's the op.textScrap that's null in my case.  Not clear on what leads to it.  It actually looks like it may be a bug in RichEditableText in the Flex SDK instead of something in TLF.

     

    Brent

     

    TypeError: Error #1009: Cannot access a property or method of a null object reference.
        at spark.components::RichEditableText/handlePasteOperation()[RichEditabl eText.as]
        at spark.components::RichEditableText/textContainerManager_flowOperation EndHandler()[RichEditableText.as]
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at flashx.textLayout.container::TextContainerManager/dispatchEvent()[Tex tContainerManager.as]
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at flashx.textLayout.elements::TextFlow/dispatchEvent()[TextFlow.as]
        at flashx.textLayout.edit::EditManager/doInternal()[EditManager.as]
        at flashx.textLayout.edit::EditManager/doOperation()[EditManager.as]
        at flashx.textLayout.edit::EditManager/pasteTextScrap()[EditManager.as]
        at flashx.textLayout.edit::EditManager/editHandler()[EditManager.as]
        at flashx.textLayout.container::ContainerController/editHandler()[Contai nerController.as]
        at flashx.textLayout.container::TextContainerManager/editHandler()[TextC ontainerManager.as]

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 25, 2010 11:14 AM   in reply to bchalupka-syPD9H

    If you have a local copy of TLF 1.1 you can work around it by adding a test at line 346 of TextClipboard.as.  Replace

         endArray.push(curFlElement);

    with

        if (curFlElement)
            endArray.push(curFlElement);

     

    That prevents the bug - but the underlying cause needs more investigation.

     

    Richard

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points