Test with TLF

All formatting complex unit tests, I hit several problems. Here are simple tests that fail with an error. Anyone know what is the problem with these tests?

Thanks for the tips,

Marc

    public function test_apply_Link():void 
    {
        var init:XML = <TextFlow xmlns="http://ns.adobe.com/textLayout/2008"><p><span>aaa</span></p></TextFlow>
        var textFlow:TextFlow = TextConverter.importToFlow(init, TextConverter.TEXT_LAYOUT_FORMAT)
        var editManager:IEditManager = new EditManager()
        textFlow.interactionManager = editManager
        
        editManager.selectRange(1,2)
        editManager.applyLink("http://livedocs.adobe.com/", "_self", true) // throws error:
        /*     
        RangeError: Error #2006: The supplied index is out of bounds.
            at flash.text.engine::GroupElement/replaceElements()
            at flashx.textLayout.elements::ParagraphElement/http://ns.adobe.com/textLayout/internal/2008::insertBlockElement()[E:\dev\trunk\frameworks\projects\textLayout\textLayout_core\src\flashx\textLayout\elements\ParagraphElement.as:277]
            at flashx.textLayout.elements::FlowLeafElement/http://ns.adobe.com/textLayout/internal/2008::createContentElement()[E:\dev\trunk\frameworks\projects\textLayout\textLayout_core\src\flashx\textLayout\elements\FlowLeafElement.as:95]
            at flashx.textLayout.elements::SpanElement/http://ns.adobe.com/textLayout/internal/2008::createContentElement()[E:\dev\trunk\frameworks\projects\textLayout\textLayout_core\src\flashx\textLayout\elements\SpanElement.as:77]
            at flashx.textLayout.elements::ParagraphElement/http://ns.adobe.com/textLayout/internal/2008::createTextBlock()[E:\dev\trunk\frameworks\projects\textLayout\textLayout_core\src\flashx\textLayout\elements\ParagraphElement.as:100]
            at flashx.textLayout.elements::ParagraphElement/http://ns.adobe.com/textLayout/internal/2008::createContentElement()[E:\dev\trunk\frameworks\projects\textLayout\textLayout_core\src\flashx\textLayout\elements\ParagraphElement.as:241]
            at flashx.textLayout.elements::SubParagraphGroupElement/http://ns.adobe.com/textLayout/internal/2008::setParentAndRelativeStart()[E:\dev\trunk\frameworks\projects\textLayout\textLayout_core\src\flashx\textLayout\elements\SubParagraphGroupElement.as:178]
            at flashx.textLayout.elements::LinkElement/http://ns.adobe.com/textLayout/internal/2008::setParentAndRelativeStart()[E:\dev\trunk\frameworks\projects\textLayout\textLayout_core\src\flashx\textLayout\elements\LinkElement.as:495]
            at flashx.textLayout.elements::FlowGroupElement/replaceChildren()[E:\dev\trunk\frameworks\projects\textLayout\textLayout_core\src\flashx\textLayout\elements\FlowGroupElement.as:764]
            at Function/http://adobe.com/AS3/2006/builtin::apply()
            at flashx.textLayout.elements::ParagraphElement/replaceChildren()[E:\dev\trunk\frameworks\projects\textLayout\textLayout_core\src\flashx\textLayout\elements\ParagraphElement.as:302]
            at flashx.textLayout.edit::TextFlowEdit$/insertNewSPBlock()[E:\dev\trunk\frameworks\projects\textLayout\textLayout_edit\src\flashx\textLayout\edit\TextFlowEdit.as:655]
            at flashx.textLayout.edit::TextFlowEdit$/makeLink()[E:\dev\trunk\frameworks\projects\textLayout\textLayout_edit\src\flashx\textLayout\edit\TextFlowEdit.as:503]
            at flashx.textLayout.operations::ApplyLinkOperation/doOperation()[E:\dev\trunk\frameworks\projects\textLayout\textLayout_edit\src\flashx\textLayout\operations\ApplyLinkOperation.as:146]
            at flashx.textLayout.edit::EditManager/doInternal()[E:\dev\trunk\frameworks\projects\textLayout\textLayout_edit\src\flashx\textLayout\edit\EditManager.as:418]
            at flashx.textLayout.edit::EditManager/doOperation()[E:\dev\trunk\frameworks\projects\textLayout\textLayout_edit\src\flashx\textLayout\edit\EditManager.as:321]
            at flashx.textLayout.edit::EditManager/applyLink()[E:\dev\trunk\frameworks\projects\textLayout\textLayout_edit\src\flashx\textLayout\edit\EditManager.as:1137]
             */
    }

    public function test_undo():void 
    {
        var init:XML = <TextFlow xmlns="http://ns.adobe.com/textLayout/2008"><p><span>aaa</span></p></TextFlow>
        var textFlow:TextFlow = TextConverter.importToFlow(init, TextConverter.TEXT_LAYOUT_FORMAT)
        var undoManager:IUndoManager = new UndoManager()
        var editManager:IEditManager = new EditManager(undoManager)
        textFlow.interactionManager = editManager
        
        editManager.selectRange(1,2)
         var format:TextLayoutFormat = new TextLayoutFormat()
        format.fontWeight = FontWeight.BOLD
        editManager.applyLeafFormat(format)
        
        undoManager.undo() // throws error:
        /*     
        TypeError: Error #1009: Cannot access a property or method of a null object reference
            at flashx.textLayout.edit::EditManager/performUndo()[E:\dev\trunk\frameworks\projects\textLayout\textLayout_edit\src\flashx\textLayout\edit\EditManager.as:540]
            at flashx.textLayout.operations::FlowOperation/performUndo()[E:\dev\trunk\frameworks\projects\textLayout\textLayout_edit\src\flashx\textLayout\operations\FlowOperation.as:181]
            at flashx.undo::UndoManager/undo()[E:\dev\trunk\frameworks\projects\textLayout\textLayout_edit\src\flashx\undo\UndoManager.as:197]             
        */
    }

For your first problem, you missed displaying the textFlow to the scene.  The code below works:

var

 

var controllerOne:ContainerController = new ContainerController (container, 500, 500);

var init:XML = http://ns.adobe.com/textLayout/2008 ">

AAA

var textFlow:TextFlow = TextConverter.importToFlow (init, TextConverter.TEXT_LAYOUT_FORMAT)

addChild (container);

textFlow.flowComposer.addController (controllerOne);

textFlow.flowComposer.updateAllControllers ();

var editManager:IEditManager = new EditManager();

textFlow.interactionManager = editManager;

editManager.selectRange (1,2);

() editManager.applyLink

"http://livedocs.adobe.com/", "_self" (, true); "

container: Sprite = new Sprite();

Tags: Adobe Open Source

Similar Questions

  • I sent a mail to test with a confirmation of delivery and read receipts, but it did not work. The test e-mail has been received and read.

    My wife's computer sits adjacent to my workstation. I sent him an email to test with a confirmation of requested delivery and read receipts. I opened the computer and downloaded and read the message. Nothing was returned to me at the moment.

    Try this

  • Tecra M2 shows 598 mhz max when testing with speedstepping

    Hi all, I have a Tecra M2 I bought from a friend.

    The only thing I have a problem with is the speed of the CPU (Pentium M). He says it's 1800 mhz but shows only 598 mhz max when testing with speedstepping. I looked all over for an answer, usually being updated BIOS (I) change the settings in power options to "always you" (I) still none of these options work, I told him to check in the BIOS to see if speedstepping is activated and I don't see an option.

    I know that the laptop remains at 600 mhz for economy of energy etc., but it goes ever higher when stressing with many applications etc.. Please help I am tearing my hair out trying to fix it. PS while typing that I checked the application of speedstepping and he says that the CPU is clocked at 144 mhz!

    Thanks Simon

    Hello

    If the processor remains on 598 Mhz and does not run faster then, I suppose that an updated firmware not the ASP technician
    In cases like replacement motherboard firmware must be updated
    If this will not happen then the CPU only runs at ~ 600 Mhz.

    Update the firmware ONLY by ASP I think you need to call the guys for the manipulation of the Fryer!

  • Several digital test with labview cluster?

    Is it possible to make a numerical limit several test with the values of a cluster of a labview vi?

    So-called step "Multiple numerical limit", the data must be numeric. If the cluster already contains only numeric fields.

    Given that, I would throw the cluster within the module in a table (table Cluster). The downside of this is that all the fields of the table share the data type, so all are single or double or I32...

    Other solutions will not work with the default step type, but you can create your own type of step to accept a multiple similar to the digital cluster, which only accepts an array.

    Norbert

  • I need to download photoshop test with the support of middele is to write in Arabic

    I need to download photoshop test with the support of middele is to write in Arabic

    Hello

    Please see Photo editing software | Download the free trial version Photoshop CC

    Hope that helps!

    Kind regards

    Sheena

  • I can't Adobe Business Catalyst. When I publish my site to my testing with Adobe Business Catalyst site, I get a message that I was out. What is going on?

    I can't Adobe Business Catalyst. When I publish my site to my testing with Adobe Business Catalyst site, I have a message that says that my Adobe ID access has expired, check your network connection. What is going on?

    Hello

    Please try to connect on Muse and sign again to make sure that Adobe ID and ID BC are synchronized.

    • To disconnect Muse, click Help > Sign Out
    • Muse of output
    • Revive the Muse and sign in with your Adobe ID.
    • Publish again to check if it works

    If the problem persists please let me know.

    Concerning

    Vivek

  • Failover test with and broker, flashback.

    Hello

    We have a requirement where we need to test failover to the production database. Currently we have 11.2.0.3 on Linux as production and even on another machine as the day before. We do not enabled DG broker and Flashback in any database. I want information below:

    (1) how to test failover with Flashback and DG broker in any database?

    (2) how to activate the DG broker and failover of Flashback and test with DG broker and Flashback?

    (3) how can I return back the changes after the failover for example, I want to see the production as the production and standby standby as previously.

    Thank you very much in advance.

    -Renault

    To question 1, you can start with this:

    http://www.Visi.com/~mseberg/data_guard/Data_Guard_Failover_Test_using_SQL.PDF

    For question 2, you can start with this:

    http://www.Visi.com/~mseberg/data_guard/broker_setup_example.html

    Question 3 is taken up by the link in question 1. You can also use RMAN instead of flashback.

    I would consider long and hard thinking all failover and install a test for that system it ask you some questions

    I can make a move to the place?

    How long can I I be down and how much time will take to recover from a failover?

    Should the business really a failover option?

    Best regards

    mseberg

  • 'The applet bad class name' exception when you try to save functional forms/EBS test with Oracle Open Script 12.2.0.1 in JRE 1.6.0_45

    Hello

    I have a problem when you try to save functional forms/EBS test with OpenScript in 12.2.0.1 and also 12.1.0.2 version.

    The problem has been verified in two environments:

    1. Windows XP 32-bit, Internet Explorer 7, 1.6.0_45 JRE.

    2. Windows 7 32 bit, Internet Explorer 8, 1.6.0_45 JRE.


    The exception that I can see in the Java Console is:

    ...

    SSV dialogue is removed

    Loading of ATS Oracle Forms Module functional test [5.5] [JRE_1.6.0_45 Oracle]

    Temporary directory FormsFT Helper: * \Temp\OpenScript_FormsFT

    ...

    Loading cached forms pots...

    ....

    oracle.forms.engine.Main cracked

    Base: exception: the applet Bad class name.

    exception: the applet Bad class name.

    java.lang.SecurityException: applet Bad class name

    at sun.plugin2.applet.Plugin2Manager.createApplet (unknown Source)

    to sun.plugin2.applet.Plugin2Manager$ AppletExecutionRunnable.run (unknown Source)

    at java.lang.Thread.run (unknown Source)

    Exception: java.lang.SecurityException: applet Bad class name

    I think that I already tried all possible combinations with options and preferences of OpenScript.

    I also reinstalled several times to JRE.

    What is interesting is that everything works fine when I use the 1.6.0_38 JRE. However, all versions up to it give me the above exception.

    Could you please give me some advice what I can do or check? Maybe you can provide me with some information about the things that have changed in JRE 1.6 update 38 which can affect the load java applets by OpenScript?

    Everything I could find in the release notes was that some security problems have been repaired.

    Thanks in advance for any help.

    Because of security changes introduced in JRE, use NO build longer than 38 for JRE 6 (1.6.0_38) and does not exceed the 11 for JRE (1.7.0_11) 7.

    REDA

  • Construction of test with several results

    Hi, I have the question of Lilybyri:

    I'm learning to build test with several results from your article:

    Construction of Test with several results (CP5)

    That's exactly what I need. My question can I use the interaction of radio button or smart shape rather click on? What do you recommend? I used CP7 CP8.

    Need to publish the final test HTML5 and the output SWF. My test wil have 55 questions and 4 results score-one of them describe the personality of the learner.

    Yarik

    Advasntage to click on the button box and shape, it's that they have points

    attached to it. This is not the case for the interaction of radio buttons that has

    also limited formatting options.

  • Stress testing with JMeter - error

    Hello
    I followed the post by Chris Muir, configure Jmeter. It worked fine with the application deployed in Weblogic server 10.3.4.0 (developed using Jdev 11.1.1.4.0)

    http://one-size-doesn

    But once we moved to Weblogic server 10.3.5.0 (Jdev 11.1.2.0.0), following the steps above is to launch the common * "inactivity" * message. I also noticed the * 'JsessionId' * part mentioned in the article is not present in the URL now.

    Can someone please advice what I need to do differently with the new version of the JDeveloper to get this working

    Published by: janak on July 12, 2012 07:02

    Some tests today on 11.1.1.6.0, I'm not sure you need you worry Afr-window-Id, so try without replacing ${Afr-Windows-Id} in your applications.

    BTW, did you start this process on a small test to see if you can get that to work rather than a big test with 100s of applications?

    CM.

  • Test with Prod DB synchronization

    Hello

    I have a requirement to keep synchronized my DB test with prod every day. The database size is more than 2 TB (cloning every day is not possible given the size). I know streams but wanted to know is there another option such as taking backups incremental level of prod and apply in test every night.

    Is this possible as is the case in this thread
    Re: problem of sync standby.

    OS: OEL5
    Oracle: 10 gr 2


    Thank you
    Ankurk

    to keep in sync my DB test with prod every day

    I'm not sure to understand what it is to have a test to prod db update database...
    In any case, you can opt for a standby database that you could probably open in read-write mode, and then restore every night from point in time (before the open read-write) and apply the redologs generated on the primary database during this day.
    But again, why make a database of test with daily data of prd? A test database must be separated from the prd, from my point of view, it should not be linked to the prd of database as a database of pending.

    Nicolas.

  • Tests with concurrent users on HTTP Web load

    Hello

    I'm trying my PHP Web Application load testing.

    I record (with Firefox) and developed the test with OpenScript script,.
    but I found that I could only test with function "Iteration".

    Is it possible to do load tests with concurrent users (connection of users at the same time multi) defined in the database?

    Thanks for help.

    Hello

    You need to load the script in BTA (Oracle Load Testing) you can download it from here , you have the first link Oracle Application Testing Suite and run the OATSxxx.exe to install the BTA.

    Concerning

    Alex

  • How to make a limit digital test with OR condition

    Is it possible to make a test step which is a comparison with a RC and NOT to condition?

    The code module returns a revision of PCB and the acceptable values are not States.map.

    For example, review of card must be 14, 15 or 17 but not 16.

    Stage of Custom Types are a type so they copied to any sequence file that contains one instance of them.  So when you deploy you will be fine without having to deploy all the ini files.

    You can actually just create the new stage in the movie only file and not worry do ini-files.

  • Testing with sandbox and In - App purchases no longer works

    Hi, I'm currently testing in-app purchases...
    It worked well for a while, but now when I try to access the app on AppWorld with the contentID or the SKU

    I get this error message: "we are unable to connect to blackberry appworld please make sure that your device is connected to the wireless network and try again.

    I tried downloading a new project and is always the same.

    As for in-app purchases, I have an older version already installed that I could successfully make a purchase using the accounts of sandbox, but now I just can enumerate all purchases available from the server of the RIM, but when I try to 'buy' it returns an error: "Content not found, ID:XXXXX" or something like that.

    Anyone know what is happening?

    I was just notified that the payment of Sandbox server is currently down, which is the cause of these issues. I'll post to this Commission as soon as I hear that it is resolved.

  • Can not do the ping test with to assign a VF SR - IOV for an operating system called window 2008.

    Hello

    I am very confused on below question:

    When I using a 2008 guest operating system window, can't do the test of ping with a pc.

    But if I'm using a linux guest OS, it doesn't.

    NIC: x 540 - at2

    ESXi:5.5 u2

    Steps to follow:

    1. install ESXI.

    2. create VFs and create the guest operating system.

    3. assign to guest operating system.

    4. install the driver on the windows of the guest operating system 2008.

    5 make the test ping with a pc.                < = problem

    Maybe need a configuration on the guest operating system or ESXI?

    or maybe it's a limitation of vmware?

    Update intel IGB driver to 3.21.4 on the ESX host and try...

Maybe you are looking for

  • SSD not recognized

    Just got an OCZ 240 GB SSD for my Pavilion DV7deleted my backup HDD and pluged in the SSD, rebooted the machine very well, but he does not see the SSD.What should I do?

  • How to disable together them on the front panel lights

    I have a VI that the front panel is shown below where an indicator of the chain is having a problem. The witness here shows the value "Please save the value of Temp Air [C]". Problem When the indicator is clicked on in the front panel the text box be

  • AnyConnect 2.5 on XP installation fails

    Anyone who has trouble with Anyconnect 2.5 install on Windows XP?  Once it breaks down, can I have the user click on the link of manual installation and works perfectly.  However, the automatic installation fails.  Users have administrator rights.  2

  • Windows 7 Professional out of stock? !!!

    Is there someone in this forum can explain to me why Windows 7 Professional is not available, I need to purchase the full Version Windows 7 Professional I can't update my Windows 8 computer but everytime I try to get the information of Windows I rece

  • NEED HELP! Download error on creative cloud

    I get error download on creative cloud. I use windows OS 10. All the tracks?