How to copy a textflow?

Dear Sirs,
I need make a copy of textflow, but I'm having difficulties. I try to use the deepCopy, but it also copies the header <textflow /> , and when I insert in another textFlow, it's duplicate:
var el1: FlowElement = textflow.deepCopy();
textFlow2.replaceChildren(0, textflow.numChildren, el1);
Result:
<TextFlow whiteSpaceCollapse="preserve" xmlns="http://ns.adobe.com/textLayout/2008"><TextFlow whiteSpaceCollapse="preserve" xmlns="http://ns.adobe.com/textLayout/2008">Teste</TextFlow></TextFlow>
Is there some way to go about this?

I'm not sure what getTextFlow() and getTextFlow2() return.
My original example wasn't tested - sorry about that.  The below works.  Iin older builds addChild does not automatically remove a child from its parent.  More recent builds do.  For that you will need to use the code in green.
var textFlow:TextFlow = TextFilter.importToFlow(markup, TextFilter.TEXT_LAYOUT_FORMAT);  
var copiedTextFlow:TextFlow = textFlow.deepCopy() as TextFlow;  
var someOtherTextFlow:TextFlow = new TextFlow();
someOtherTextFlow.replaceChildren(0, someOtherTextFlow.numChildren);
while (copiedTextFlow.numChildren)
// in order builds this is a little more complicated (psuedo code here you will have to debug it)
// var child = copiedTextFlow.getChildAtIndex(0);
// copiedTextFlow.removeChild(child);
// someOtherTextFlow.addChild(child);
someOtherTextFlow.addChild(copiedTextFlow.getChildAtIndex(0));
Regards,
Richard

Similar Messages

  • How to copy file from global zone to non-global zone?

    Hi,
    I'm new in zone.
    I have installed a zone and I would like to install some programs.
    Could you please tell me how to copy downloaded file from internet to the new installed zone?
    Kind regards,
    Daniel

    I like to use zcp which came from BigAdmin I believe.
    #!/usr/bin/perl
    # zcp - copy a file from the global zone to a nonglobal zone. Solaris 10.
    # 10-Mar-2005, ver 0.50 (first release)
    # USAGE: zcp file1 zonename:file2
    # eg,
    # zcp /etc/syslog.conf workzone1:/tmp
    # Standard Disclaimer: This is freeware, use at your own risk.
    # 10-Mar-2005 Brendan Gregg Created this.
    $ENV{PATH} = "/usr/bin:/usr/sbin";
    $VERBOSE = 1;
    # Process arguments
    # check for arguments,
    if (@ARGV != 2) {
    die "USAGE: zcp file1 zonename:file2\n";
    # check source file exists,
    $srcpath = $ARGV[0];
    if (! -e $srcpath) {
    die "ERROR1: Can't find source file $srcpath\n";
    # check destination zone exists,
    ($destzone,$destpath) = split(/:/,$ARGV[1]);
    chomp(@Zones = `zoneadm list`);
    foreach $zone (@Zones) { $Zone{$zone} = 1; }
    unless ($Zone{$destzone}) {
    die "ERROR2: Can't find zone $destzone\n";
    # check if destination is a directory or filename,
    $dir = `zlogin -S $destzone '
    if [ -d "$destpath" ]; then echo 1; else echo 0; fi'`;
    if ($dir == 1) {
    $node = $srcpath;
    $node =~ s:.*/::;
    $destpath = "$destpath/$node";
    # Print message
    print "zcp from $srcpath, to zone $destzone, to file $destpath.\n" if $VERBOSE;
    # Copy File
    system("cat $srcpath | zlogin -S $destzone 'cat - > $destpath'");
    # Verify file copied
    $srcsize = -s $srcpath;
    $destinfo = `zlogin -S $destzone 'ls -l $destpath'`;
    @Fields = split(' ',$destinfo);
    $destsize = $Fields[4];
    if ($srcsize != $destsize) {
    print STDERR "ERROR3: Copy failed, size mismatch ".
    "($srcsize != $destsize)\n";
    } else {
    print "Copy successful ($destpath, $destsize bytes).\n" if $VERBOSE;
    }

  • How to copy file from application server

    Hello experts,
    How to copy file from one folder of application server and paste it to other folder of application server(application server is same)?
    Is there any function module exists???
    thanks in advance
    Saurabh

    Hi you can use this function module to move a file from application server to another folder on application server.
    call function 'WS_FILE_COPY'
               exporting
                    destination = m_destination
                    source      = m_source
               importing
                    return      = return.
    Plus u can use this function module to delete the file from that folder from which u want to replace it.
          call function 'WS_FILE_DELETE'
               exporting
                    file   = m_source
               importing
                    return = return.
    The above FM can help u copy a file from one folder to another and delete the file from that folder.

  • How to copy/download  all ABAP programs in a text with a single report  ?

    How to copy/download  all ABAP programs in a text format with a single report/TC  ?
    How to copy/download  ABAP source code with all include programs ?....
    we need to search & copy all include programs everytime....

    Hi,
    check this link
    downloading programs
    Regards

  • How to Copy a Long Column in PL/SQL

    Hello. Can anyone tell me how to copy a table that contains a long column? I am using Oracle 8.0.5 SQL Worksheet
    with the following code that generates an ORA-06502: PL/SQL: numeric or value error.
    CREATE TABLE "Tmp_CB_REPORT"
         CB_RPT_ID NUMBER(38, 0),
         CB_ID NUMBER(38, 0),
         CB_REGION_ID NUMBER(38, 0),
         WHEN_PULLED DATE NOT NULL,
         PARSED NUMBER(1, 0) DEFAULT (0) NOT NULL,
         RAW_DATA LONG NOT NULL,
         JOINT NUMBER(1, 0) DEFAULT (0) NOT NULL,
         RPTTYPE NUMBER(38, 0) NOT NULL,
         OPTION1 NUMBER(1, 0) DEFAULT (0) NOT NULL,
         OPTION2 NUMBER(1, 0) DEFAULT (0) NOT NULL,
         OPTION3 NUMBER(1, 0) DEFAULT (0) NOT NULL,
         OPTION4 NUMBER(1, 0) DEFAULT (0) NOT NULL,
         OPTION5 NUMBER(1, 0) DEFAULT (0) NOT NULL,
         OPTION6 NUMBER(1, 0) DEFAULT (0) NOT NULL,
         OPTION7 NUMBER(1, 0) DEFAULT (0) NOT NULL,
         OPTION8 NUMBER(1, 0) DEFAULT (0) NOT NULL,
         OPTION9 NUMBER(1, 0) DEFAULT (0) NOT NULL,
         OPTION10 NUMBER(1, 0) DEFAULT (0) NOT NULL,
         OPTION11 NUMBER(1, 0) DEFAULT (0) NOT NULL,
         OPTION12 NUMBER(1, 0) DEFAULT (0) NOT NULL,
         OPTION13 NUMBER(1, 0) DEFAULT (0) NOT NULL,
         OPTION14 NUMBER(1, 0) DEFAULT (0) NOT NULL,
         OPTION15 NUMBER(1, 0) DEFAULT (0) NOT NULL,
         OPTION16 NUMBER(1, 0) DEFAULT (0) NOT NULL,
         OPTION17 NUMBER(1, 0) DEFAULT (0) NOT NULL,
         OPTION18 NUMBER(1, 0) DEFAULT (0) NOT NULL,
         OPTION19 NUMBER(1, 0) DEFAULT (0) NOT NULL,
         OPTION20 NUMBER(1, 0) DEFAULT (0) NOT NULL,
         REGION_ID NUMBER(38, 0),
         RPT_TYPE_DESC VARCHAR2(40)
    LOCK TABLE CB_REPORT IN EXCLUSIVE MODE NOWAIT;
    DECLARE
         CURSOR datacursor IS SELECT CB_RPT_ID, CB_ID, CB_REGION_ID, WHEN_PULLED, PARSED, RAW_DATA, JOINT, RPTTYPE, OPTION1, OPTION2, OPTION3, OPTION4, OPTION5, OPTION6, OPTION7, OPTION8, OPTION9, OPTION10, OPTION11, OPTION12, OPTION13, OPTION14, OPTION15, OPTION16, OPTION17, OPTION18, OPTION19, OPTION20, REGION_ID, RPT_TYPE_DESC FROM CB_REPORT;
         datarecord datacursor%ROWTYPE;
    BEGIN
         OPEN datacursor;
         LOOP
              FETCH datacursor INTO datarecord;
              EXIT WHEN (datacursor%NOTFOUND);
              INSERT INTO "Tmp_CB_REPORT"(CB_RPT_ID, CB_ID, CB_REGION_ID, WHEN_PULLED, PARSED, RAW_DATA, JOINT, RPTTYPE, OPTION1, OPTION2, OPTION3, OPTION4, OPTION5, OPTION6, OPTION7, OPTION8, OPTION9, OPTION10, OPTION11, OPTION12, OPTION13, OPTION14, OPTION15, OPTION16, OPTION17, OPTION18, OPTION19, OPTION20, REGION_ID, RPT_TYPE_DESC) VALUES (datarecord.CB_RPT_ID, datarecord.CB_ID, datarecord.CB_REGION_ID, datarecord.WHEN_PULLED, datarecord.PARSED, datarecord.RAW_DATA, datarecord.JOINT, datarecord.RPTTYPE, datarecord.OPTION1, datarecord.OPTION2, datarecord.OPTION3, datarecord.OPTION4, datarecord.OPTION5, datarecord.OPTION6, datarecord.OPTION7, datarecord.OPTION8, datarecord.OPTION9, datarecord.OPTION10, datarecord.OPTION11, datarecord.OPTION12, datarecord.OPTION13, datarecord.OPTION14, datarecord.OPTION15, datarecord.OPTION16, datarecord.OPTION17, datarecord.OPTION18, datarecord.OPTION19, datarecord.OPTION20, datarecord.REGION_ID, datarecord.RPT_TYPE_DESC);
         END LOOP;
    END;
    The copy works fine if I remove the long column from the CREATE TABLE "Tmp_CB_REPORT" statement
    and the cursor copy statement. Any help is appreciated.

    What I think you should do is to turn your long into a LOB. LOBs are much malleable than LONGs. I suggest you have a look at the documentation for DBMS_LOB. You can create a function using DBMS_LOB that uses a temporary CLOB to reas your long column an dreturn a CLOB.
    Cheers, APC

  • How to copy attributes (as in which playlists) from one song to another

    Hi,
    Does anyone know how to copy the characteristics of a song--as in which playlists it appears in--from one song to another, so that the new song then appears on all those same playlists also? Or, if not, maybe you have some other idea for me:
    I'm working with a Mac. I have several hundred playlists with ~100 songs each, and about 3,500 songs in my iTunes. Most of these songs are currently AACs. I've realized I have a problem: If I want to burn disks with MP3-format songs, I will need to convert the AAC to MP3s to burn them. If I don't want to have thousands of duplicate songs, I will need to trash the AAC versions of those songs from my library. If I do that, they will disappear from the playlists they are currently in (one song might be in 20 different lists). If I had to manually take each MP3 version created, look at which playlists the original AAC version is in, drag the MP3 version to each playlist, and delete the AAC version, it would take a Looooong time. Does anyone know of any shortcuts? For example, is there some way to copy the information about which playlists a given song is in and then paste that info onto the new version so it now appears also in these playlists? Or some other idea? Thanks very much!
    Molly

    Never heard of any way of doing that. However, you may want to check out Doug's Scripts. There might be something there to help.
    http://dougscripts.com/itunes/index.php
    Best of luck.

  • How to copy the same address for multiple contacts in Address Book?

    Hi! I got a question, I didn't find an answer for yet.
    How to copy the post address from one contact to another, without manual entering. I mean if I have one contact with already entered post address, can I just copy it someway at once to another contact?
    I don't want cards to merge, I need separate contacts, that may have different phones, e-mails, but the same post address. Please, advise.

    Thanks! yes, this is a solution I'm following now. But I was wondering about the similar way as it is made in Daylite or Contactizer - you create company with name and post address first, and then can create a contact for that company. And company name and post address will appear in contact name.
    I just wonder why such a simple and useful solution isn't available in Address Book as default.
    I know there are many scripts written for Address Book. Maybe there is something for this purpose?

  • How to copy a page( webpart page) with its content using client side.

    How to copy a page(in my case  webpart page) with its content(it may contain webparts) using client code (i mean using SPservices or ECMA script).
    What i am planning is ,to give end user a page where it will contain text box to specify  name of page and a button with the help of  content editor webpart.
    where on click of button we need to write client side code such that it should create a new page from a existing page in a library with given name by user.
    Any suggestion would be helpful. For your information we can do it through UI with the help Site Actions / Manage Content and Structure.But i want to automate it using client side code.Server side code is restricted.
    or can we create a template of an existing page with content without the help of sharepoint designer.
    Thanks in advance
    with regards Ravichandra

    This is good example
    http://balajiindia.wordpress.com/2011/05/27/using-jquery-with-custom-web-services-in-sharepoint/
    Create web service
    http://balajiindia.wordpress.com/2011/05/27/using-jquery-with-custom-web-services-in-sharepoint/. Create method "Create Page" http://www.learningsharepoint.com/2010/09/17/create-publishing-pages-sharepoint-2010-programmatically/
    Build your Java Script. You can use Content Editor Web Part if you want to avoid custom web part development http://www.codeproject.com/Articles/544538/JQuery-with-SharePoint
    Oleg

  • How to copy referenced photos from dodgy external drive to new drive when whole file will not copy due to error 36.

    My external WD portable passport drive must be dodgy because I can't back it up or clone it or copy 3 of my 22 photo files to a new portable drive. I get error 36 as I attempt all 3 processes. I have copied my iPhoto library, iMovie events and most of my aperture referenced photos to the new drive. But cannot copy 3 files that contain the corrupted files showing just a grey triangle. I cannot delete or move to trash the corrupted raw photos.
    How can I copy to the new drive any photos that aren't corrupted (grey triangle instead of photo or a photo that's just coloured horizontal broken lines) so I can then reconnect the referenced photos after copying them?
    I am on late 2008 MacBook Pro with lion,
    Many thanks
    Bw

    I've worked out how to copy and reconnect individual photos.
    But can see that what's happening is that heavily edited raw photos are taking ages to load. Or not loading at all. And if opened go to the spinning wheel for 5-10 minutes. I am wondering whether to compress these or take them back to the originals or any other ideas would be very welcome.
    Thank you
    BW

  • How to Copy Standard form in Smartforms?

    Hi Experts,
    can anyone tell how to copy a standard form in Smartforms.
    Thanks in advance

    Hi Abdul,
    We have to copy them to '800'. (this is your own company define client no)
    All Standard Scripts and their respective print programs are listed in table 'TNAPR'.
    Ex: FORM MEDRUCK has the Driver Program SAPFM06P.
    NOTE: Never make any changes to the Standard Driver Programs
    STEP 1.
    Goto Transaction Code <SE71> and 
    select from Menu UTILITIES ->Copy from Client.
    Enter the Standard Form Name, It source Client 000 and the target Form Name that you want it to be saved as on your client.
    Say you are naming it as zmedruck1.
    Click on EXECUTE.
    STEP 2.
    Converting form to English.
    Open zmedruck1 in <SE71> With language DE.
    Then goto  UTILITIES -> Convert Original Language from DE to EN.
    Then you can modify the layout for example, chaging the logo, or changing the headers, or adding any new code to do some calculation etc.,
    SAVE THE CHANGES AND ACTIVATE.
    Then select from the menu  FORM -> CHECK -> TEXT.
    SELECT your driver program name from the list adn click on COPY.
    If you don't see the program name in the list then click on 
    'APPEND PRINT PROGRAM' and add your program name and then select it from the list and click on COPY.
    STEP 3: Assigning our form to the standard print program.
    Start Tr.Code <NACE>.
    In our present case since we are working on 'Purchase order' we have to select EF and click on the button Output Types.
    Then on Right hand side, scroll down and select  NEU - New P O Printout. 
    (This may change for different programs).
    Then Double click on  Processing Routines on Left hand side.
    Change from Display -> Change Mode. 
    Give your form name (zmedruck1) for printoutput and SAVE.
    STEP 4:
    Start Tr.Code <ME22N> since you are working on Purchase order and click on print Preview to make sure your layout etc., changes are OK. If not again you have to make the changes accordingly.
    If every thing looks ok then you can print your form.
    Regards,
    Sathish:)

  • I had my iPhone 4S stolen last week and I am going to sync it to my computer to get everything back on it. I have a new computer, i know how to copy music over to the new computer, but where are the contacts stored on the computer?

    Hi there,
    Can anyone help me!? I know how to copy my music library to my new computer but struggling with copying the contacts etc. Where do I find the contacts folder on my old computer?
    Thanks
    K

    I had my iPhone 4S stolen last week and I am going to sync it to my computer to get everything back on it.
    If it is stolen , how are you going to sync it?
    You mean you got a new iPhone and you want to sync it to your computer?
    Plug it in.
    I know how to copy my music library to my new computer
    New computer??? Or new iPhone?
    I know how to copy my music library to my new computer but struggling with copying the contacts etc. Where do I find the contacts folder on my old computer?
    I suggest you simply copy your entire User folder from old computer to new computer. This way all your data (Music, photos, contacts, emails, calendars, documents, etc.)  goes across.

  • How to copy file to another server from database using FTP in oracle

    How to copy file to another server from database using FTP in oracle.
    Please do the needfaul.

    Billy  Verreynne  wrote:
    BluShadow wrote:
    Not to mention that some FTP servers can return more than one return message per operation whereas others may return one message for the same operation.I had the problem using the LIST command to determine if a file exists on the server. Cannot be determined via the FTP server's return code. Which means parsing and checking the text response from the server to the command. And this vary from server to server.
    But the basics were quite easy to code. The entire package is 500 lines, includes comments and blank lines for formatting, and supports the basic FTP client command set. Not really a complex piece of software to write - but I found that many developers seem to think that writing network socket software is complex. Not really the case...Mine's a big larger, but incorporates functionality similar to what Chris provided in his, such as being able to use SQL to query a remote file using pipelined functions, or functionality to write the results of a query directly to a remove file.
    :)

  • How to copy function group from one SAP system to another

    dear all,
    our company will set up a sub-company currently,and the sub-company want to copy some programs from our SAP system.
    how to pack and copy function group?
    pls help me,tks!

    Hello  Snow zeng,
    Will the 2 systems be connected ? I.e Same land scape ?
    If they are non connected systems, check this Wiki by Marcin [How to copy Repository Objects between non-connected SAP systems|http://wiki.sdn.sap.com/wiki/display/ABAP/HowtocopyRepositoryObjectsbetweennon-connectedSAPsystems]
    Regards

  • How to copy a tab from one tab group to another?

    In Tab groups view, drag and drop allows one to move one tab from one group to another. But how to copy a tab?

    Press '''CTRL''' while dragging to copy instead of moving.

  • How to copy images from another MC in reversed order??

    Hi everyone,
    I'm new to AS3 and have been fighting and searching for a solution to this problem for a week now, and I'm VERY close!
    I crated a MC holding of a series of images (about 50) and I jump around in it using plenty AS3 scripts (most of which I don't fully understand yet, but I'm working on that to! )
    I had to find a way to "rewind" (= play backwards) the MC. Since there is a stop(); command in almost every frame, prevFrame does not work and if I put that in a loop, it goes WAY to fast (but worked).. So I could think of only one way...
    Create a new (reverserd) MC with the same image sequence ald reverse it manually and play that one.
    This all works fine (very proud of it ).
    Now my question:
    To get this to work for multiple image sequences, I have to load all images twice (once in MC_1 and again in MC_2 and select them and reverse them).
    Not a big one, unless you want to create MANY of those SWF's...
    Is it possible to load the 50 images of the first MC in reverse into the second MC dynamically? JUST the images, noting else.
    extra info: the MC_2 is already in the lib(empty) and placed on the stage.
    something like:
    var pointer:Number=1;
    for (var:i:Number=50;i>=0;i--) {
    get MC_1.picure(var);
    put it in MC_2.frame(pointer);
    pointer = pointer + 1;
    All help is welcome and please take into account that I have little experience and copy most of my scripting from people like you
    T.I.A.
    Melluw

    I tried your advice (thanks for that)
    The event I already have is the mouse leave
    I //-d out the part I removed (what did work)
    The code I ended up with is:
    function Start() {
    stage.addEventListener(Event.MOUSE_LEAVE, cursorHide);
    function cursorHide(evt:Event):void {
    var currFrame = MC_1.currentFrame;
    if (CCW == true) {  //it is true in this case
      movStart = (50 - currFrame);
    else {
      movStart = currFrame;
    if (movStart>25) {
      MC_1.prevFrame();
    // removed swapChildren(MC_1, MC_2); // This is the part I removed
    // removed MC_2.gotoAndPlay(movStart);
    else {
      MC_1.gotoAndPlay (movStart);
    And if I leave the stage on the part where movStart is indeed >25
    Nothing happens,
    So I guess this is not what you meant
    Subject: Action Script 3 how to copy images from another MC in reversed order??
    I cannot direct you in the loading of the images approach, it will be too complicated, and will probably not work anyways... when you move away from a frame that has dynamic content, you lose the content.  So basically, there is nothing practical in taking that approach.
    I do niot understand what the problem will be with the enterFrame/prevFrame approach. If everything you can do with the mouse is already used (which I doubt) by the first mc, then there is nothing else you can do with this file.  You probably just need to rethink your control scheme.  You should search Google for "AS3 slideshow tutorial", and to lighten up your design, add "XML" in that search.
    >

Maybe you are looking for

  • How to dispaly grid of Analysis in WAD in BI 7.0?

    In BI 7.0, when I insert an Analysis into Web Application Designer and execute it , the cells of the Analysis don't display the  grid of it. But in BW 3.5, the grid of Analysis can display automatically. Can anyone tell me how to config to display gr

  • Restrict F4 (Search Button) of ship to party in Delivery

    Hi, At present if the users press the F4 button in ship to party, it is shown to customers list. My requirement is, Display customers list in Delivery transactions (VL01N,VL02N,VL03N) by pressing F4 in ship to party, system should not show the list.

  • AMD dual core 4200 2.2 vs i7 2.7?

    Besides the obvious, what's the difference between these two processors. Is there a significant power gain from the i7? I have a PC running the AMD chipset with 3 megs of RAM and just bought a MBP 13" with the dual core i7. What kind of performance g

  • Changing the dehydration database in soa 11g

    Dear all, I have a requirement,in which I have to change dehydration database in soa 11g in production environment. How feasible this is...?..what issues I might fall into??..............and is it not recommended at all??....please throw some light..

  • Local Network Address Change

    I have a WRV210 router. I can see it and configure it either manually or through the setup program. If I change the router address from 192.168.0.1 to 192.168.3.1 and reboot both the router and my computer I can access the internet, ipconfig says tha