Adding space at the end of a ritchEditableText  line

Hi!
I found an interesting behaviour in my application.  I have a RichEditableText component with a fixed width . If I add text till almost the end of the line and then  insert spaces, the cursor get's stuck at the end of the line. My surprise was on retreiving the text from that line in the code, where all that spaces existed even if they were not visible in the app. So on screen you see let's say 3 spaces, but then you save the text you can get 10. If you keep inserting any letter the cursor will move itself to the next line, but this does not seem to be the case of " "(space).
I tested it useing the following code. I'm useing 4.1 sdk.
<s:RichEditableText id="richTxt"  width="100" height="500" change="richTxt_changeHandler(event)" />
protected function richTxt_changeHandler(event:TextOperationEvent):void
                var noOfLines:int = richTxt.textFlow.flowComposer.numLines;             
                for (var i:int = 0; i < noOfLines; i++)
                    var startIndex:int = richTxt.textFlow.flowComposer.getLineAt(i).absoluteStart;
                    var seqLength:int = richTxt.textFlow.flowComposer.getLineAt(i).textLength-1;
                    var textLine:String = richTxt.text.substr(startIndex, seqLength);
I try to set clipAndEnableScrolling=true; for richTxt but this thid not change anything.
How can I retrieve only the visible text( with the corect number of spaces at the end of the line) from the RET in order to save it ?
Thanks !

Do you want to handle that space or just use the text value?
If you just want to use the text value (i.e 1word - space)...u simply say CONDENSE <UR TEXT VARIABLE>.
Else the other option is: Find the string length and then handle it the way u want.
Or if u r sure that every word has that extra space, and u dont want that u can even use SHIFT RIGHT BY 1 PLACE in thet text variable.
Hope this helps.
Thanks
Kiran

Similar Messages

  • Check space in the end to display warning message.

    I am currently working on validations on functional locations in the EDIT MASK. the code is already written for validations on to check for space in the beginning of the each level in the edit mask. however user requirement is that the program should produce warning messages for spaces regardless of where they appear in the Edit Mask. we have not validated to check for space at the end of each level.
    I have checked with condense ,shift string right deleting trailing spaces however I am not able to check for space at the end of levels.
    when i debugged the program the level8 length shows as 2 even though there is only one char in the level8. i
    could you please suggest any possible solution or any keywords that would help. you can go through the below code which is already written for checking space in the begining.
    here l_level1
    Level 8 errors
        l_length = STRLEN( l_level8 ).
    IF ( l_level8 = space AND l_dash_count > 6 ) OR
             l_dash_count > 7 OR
             l_length > 4.
          lt_mask_err-error = '8E'.
          APPEND lt_mask_err.
          l_errlvl8 = c_y.
        ENDIF.
    Level 8 Warning
        IF rb_bdc <> c_on AND p_warn = c_on AND
        ( l_level8 <> space AND l_level8+0(1) = space ).
          lt_mask_err-error = '8W'.
          APPEND lt_mask_err.
        ENDIF.
    i have added this code to display warning message using shift.
        l_lev8 = l_level8.                                                
        shift l_lev8 right.                                             
        l_length = STRLEN( l_lev8 ).                                    
        IF rb_bdc <> c_on AND p_warn = c_on AND                       
        ( l_lev8 <> space AND l_lev8+0(1) = space ).                    
          lt_mask_err-error = '1W'.                                     
          APPEND lt_mask_err.                                          
        ENDIF.

    You can use REGEX for string parsing, it is really handy. If you would like to test it out check out program "demo_regex_toy".
    Trailing space:
    FIND REGEX '[ ]+$' IN lv_text.
    leading space
    FIND REGEX '^[ ]+' IN lv_text.
    Any space
    FIND ALL OCCURRENCES OF REGEX '[ ]+' IN lv_text.

  • Issue in adding Space to the existing Virtual Machine from added repository

    Hi,
    I'm facing issue in adding Space to the existing Virtual Machine (Guest OS) from added repository.
    Environment details :
    VM Server : /OVS => 130GB
    /OVS/935970F2CC2D4B4391701397517F1001/ => 512 GB
    Things I have done :
    •     I created a VM (Guest OS) in the VM Server with 120 GB
    •     After creating the VM (Guest OS) , When I tried adding a VIRTUAL DISK of size 150 GB , I got an error “Maximum available Disk space is only 10GB”.
    My query :
    •     Will I be able to add space to Existing VM from the added Repository ( /OVS/935970F2CC2D4B4391701397517F1001/ ) , whose system.img is stored in path /OVS/running_pool/34_rhel/ .
    Kindly help me out in this.
    Thanks in advance.
    -- Sri

    Hi all,
    I checked with Oracle on the above and got the info currently , the we can utilise only the space available in the existing repo and cannot extend to additional repo.
    Work around is : Clone it to the other repo , or Use Symbolic link .
    Thanks,
    Sri.

  • Preserve a single space at the end of line using spool command

    Hi,
    Can you please help me to write the result of an sql query into a file with the last column of the row ending with a single space?
    For example:
    COL1DATA|COL2DATA|COL3DATA<space1>
    As mentioned in the example the col3 value in the file should end with a single space. And there should not be any delimiters at the end of the row.
    I tried with set trimspool on/off. But, it didn't work. When I say trimspool on - it is trimming all the trailing spaces.
    When I say trimspool off - it is retaining all the trailing spaces to the size of the line.
    But, I do not wish to modify the file through shell commands once it is written thru spool. I mean I do not wish to append spaces to the end of a line using shell script or any other method.
    I do not wish to use other methods like UTL_FILE also.
    Please help me how to do it using spool command?
    Thank you.
    Ramana

    My requirement is that all the trailing spaces should be truncated except the last one in the row.Why?
    As you have discovered a single column in sqlplus, is always a fixed length regardless of the size of the data, if the length of the data varies the output is padded to the maximum or line size with spaces. The trim and trimpsool commands are there to remove all the spaces from the end of a line if there are any. There are no commands to trim all the spaces except one, or even to trim all the spaces except two, or three even.
    If you want such custom processing you should post process the file in the OS using sed, awk or perl or something designed for such things.

  • How to add spaces at the end of record

    Hi Friends,
    i am creating a file which contains more than 100 records.
    In ABAP i have internal table with on field(135) type c.
    some time record have length 120, somtime 130 its vary on each record.
    but i would like to add space at the end of each record till 135 length.
    Can you please help me how to add speace at the end of record.
    regards
    Malik

    So why did you said that in your first posting? My glass sphere is out for cleaning...
    Instead of type c use strings and add spaces until they have the appropriate length.
    loop at outtab assigning <pout>.
      while strlen( <pout>-val ) < 135.
        concatenate <pout>-val `` into <pout>-val.
      endwhile.
    endloop.

  • Save a pdf file without Adobe automatically adding "-Copy" to the end

    How can I save a pdf file without Adobe automatically adding "-Copy" to the end of file name?

    If you have actually made any changes (e.g. adding a Sticky Note or filling out forms), the Save button will appear in the bottom toolbar.  It will save it as the same name.
    "- Copy" is added only when you tap/click the Save As button.  You can change it to something else, if you'd like.

  • Blank spaces at the end of an IDoc text field get lost when posted to R/3

    Hi Guys,
    I am facing the following issue:
    In an XML file-to-Idoc scenario, there are spaces at the end of a text field in the inbound XML file, which I can see when I open the inbound file with a text editor like notepad, and they are kept after XI mapping is executed (I can see them in message mapping simulator). However, it seems that these spaces get lost once the IDoc is posted to SAP R/3 and they are not visible on SAP R/3 side.
    Do you have any idea ? Thanks.
    Best Regards,
    Evaggelos Gkatzios

    That means SAP is removing the spaces from IDoc fields, where you spaces are not allowed. Does it create any problem?
    Thanks,
    Nabendu.

  • Space at the end of a word

    Hello,
    Is there a way to recognize space sign at the end of a sentence?
    The meaning of that is that there is a word that somebody typed at the end of the sentence
    and after that pushed the space bar . When looking at the text inside the sap system the text looks fine,
    but when transferring to excel the text doesnt equal because the space at the end of the sentence.
    Please advise
    Yifat

    Do you want to handle that space or just use the text value?
    If you just want to use the text value (i.e 1word - space)...u simply say CONDENSE <UR TEXT VARIABLE>.
    Else the other option is: Find the string length and then handle it the way u want.
    Or if u r sure that every word has that extra space, and u dont want that u can even use SHIFT RIGHT BY 1 PLACE in thet text variable.
    Hope this helps.
    Thanks
    Kiran

  • How to pad spaces at the end of a string

    Hi All,
    I am new to ABAP and need help to achieve this functionality
       I have to build a string with fixed lenth . my input string
      is always lesser than equal to X . I need to calculate and
       add that many spaces at the end of the input string .
      I tried to do this and getting the following error
        please help on this :
      if strlen( t_resultc ) < 525.
      RFILL(t_resultc,' ',525)
      endif.
      Error : Comma without preceding colon(after RFILL(T_RESULTC ?)
    Q: Can I use RFILL with out Select statement in a ABAP program
    Thanks & Regards
      KLK

    Hi,
    Try the following code but kindly make a note..
    Note:-USE quote like this  ` `, Instead of normal single quotes ‘ ’
    WHILE strlen( T_RESULTC ) < 525.            “Check the length   
       CONCATENATE  T_RESULTC ` ` INTO T_RESULTC. ”Add spaces at the end   
    ENDWHILE.
    Hope this helps,
    Andrew

  • May I run "shrink DB/truncate free space from the end of file" at PROD?

    We have a SAP/MSS production system.
    The disk is full.
    We want to truncate the log file by:
    "shrink DB/truncate free space from the end of file"
    on the log file.
    How risk is it? Can we do it during production is running?
    Thanks! Points!

    Backup the log file (to save the data and keep a consistent backup) Then shrink the file. Its normal for the log not to shrink down to the size you want. Do not shrink past 1GB.
    DO NOT TRUNCATE - you are losing/dropping data and recovery will only be possible to the last on-line, or on-line plus last log/s.
    You can avoid a full log file by setting a 9002 trap - this will trigger a backup (like oraarch when you back up based on % full). Else you need to change the frequency of the backups for the logs to ensure the system never fills ups.
    You can Also add a second log file on a separate F/S if this occurs regular - which it shouldn't if you have a correct backup strategy.

  • How do i get rid of black space at the end of a video presentation?

    After creating a project in iMovie and burning it onto a DVD, I realized that when the movie was finished, it did not return to the Menu right away and instead it played 20 or so seconds of blackness that I can't seem to get rid of. Has anyone else had this problem? And how do i fix it? I have also checked if my any audio or narration tracks lengths were that long, and none were.
    Please help.
    MacBook Pro   Mac OS X (10.4.10)  

    In the course of your editing you may inadvertently have left a tiny scrap of audio or video way out at the end of your time line, with a large gap between it and the last clip in your movie. Your movie will play out until it reaches that scrap, leaving a large black gap at the end of the movie. Sometimes these scraps are so tiny that they are difficult to see and can be overlooked in normal view. Expand your time line view to its fullest extent and check to see if you can find such a scrap, left over from editing, and then delete it. It's worth a look, though you may not find anything. That's all I can think of, unless for some reason you have a 20 second long black clip at the end of your movie that you forgot to delete. (Don't laugh--it happened to me once.)
    Good luck in resolving your issue.

  • SPACE at the end of number of gl account  (ALPHA Conversion)

    Hi,
    While updating data from ODS to cube, it is giving error as <b>"Characteristic value '010000 ' of characteristic 0GL_ACCOUNT is not ALPHA-converted " </b>. If you can see there is added <b>SPACE</b> at the end of '010000'. This number is not generating any problem while activation of ODS but it generates it while updating ODS to cube . In ODS data there is no added space in it.
    Please help me to solve it. It is urgent. I will give full points for correct answer.
    Thanks.

    Hi,
    Assune your ODS name is ODS1 then you can see a transfer rules 8ODS1 under 0DM node. In that tranasfer rules you can see it ,at the dead end of <i>Communication str./Transfer rules</i> part of the screen.
    If you are not using Datamart concept, thats means if you have only update rules between ODS and Cube, then you need to make this setting in the Transfer rules used to upload the data to ODS . And then reupload the data to ODs and activation and further upload has to be done once this setting is over.
    With rgds,
    Anil Kumar Sharma .P

  • Add space to the end of textfield value

    Hi,
      I have a requirement where I need to append 2 spaces to ta textfield at the end of field for certain conditions.
    I used Concat() function and if I checked the length, it added the space successfully in the scripting. But in the output display, it is not considering the space to the text. I need this particularly because all my text fields are right alligned and if I have a space appended to the text at the end, I should able to see it in the form
    for ex:
           I need     Martin     ( for the first text field)
                       Martin       ( with two spaces appended)
    I need the output in the above way.
    Can you please help me out.
    Sample code I wrote on scripting:
    var raw = $.rawValue
    $.rawValue = Concat(raw, Space(2))
    If I check the length of field, I could see that length got increased by 2. But I cannot display in the output.
    Thanks in advance,
    k.c

    Hi,
    Instead of inserting white spaces script to change the right indent:
    if (this.rawValue == "Martin")
        this.para.marginRight = "1.5mm";
    else
        this.para.marginRight = "0mm";
    This is Javascript, but I am sure it will run in FormCalc.
    N.

  • Error while adding space to the table space

    HI Gurus
    Can you please put some light on the error which i encountered while adding space to a tablespace
    ALTER TABLESPACE "GISR_NDEX" ADD DATAFILE '+DATA2' SIZE 2G;
    ALTER TABLESPACE "GISR_INDEX" ADD DATAFILE '+DATA2' SIZE 2G
    ERROR at line 1:
    ORA-01119: error in creating database file '+DATA2'
    ORA-17502: ksfdcre:4 Failed to create file +DATA2
    ORA-15041: diskgroup space exhausted
    Any suggestion is highly apprciated .
    Thanks

    Hello;
    The "diskgroup space exhausted" is key.
    Try creating smaller files or adding disk space.
    ASM Disk Group Unbalanced :
    http://surachartopun.com/2010/03/ora-15041-asm-disk-group-unbalanced.html
    Best Regards
    mseberg

  • PI removing blank spaces at the end of the lines in a plain text file

    Hi -
    I have an interface that transfers a file via FTP. I defined both the sender and receiver to transfer either Text or Binary but the interface removes every blank space I have after the last character. The file is a fixed lenght file.
    Example:
    Original file:
    Hello world(space)(space)(space)(space)(space)(space)(space)(space)(eol)
    where (space) is the space character and (eol) is the end of line char.
    File after it is received.
    Hello world(eol)
    I already defined the parameter Row.fieldFixedLenghts with 10164 which is the lenght of the lines of the file.
    Any ideas why it may be happening?
    Thanks,
    Carlos.

    Hi -
    I tried both the parameters:
    xml.fieldContentFormatting
    structure.fieldContentFormatting
    The received file still has the problem. All the blank spaces are cleared out.
    The file is a plain text file not an XML file. May this be the issue?
    Thanks,
    Carlos.

Maybe you are looking for

  • Transaction code for Proforma invoice

    Transaction code for Proforma invoice

  • How to fill shape with pattern... and cut outline?

    I have an old plotter that works great for making drawings. I can fill a shape with a pattern, convert the pattern to outlines (or strokes) BUT my problem is that the outline of the original shape remains, and this will be plotted. I do not want an o

  • Which IDoc Type and Message Type to use for Credit Memo?

    Could you guys please tell me which IDoc type and Message Type to use for Credit Memo? Also if possible tell me the process code/ function module. Will certainly give points for right answer. Thank you for reading.

  • Time machine could not complete backup

    I am getting the following message "the backup disk image "volume/.....macbookpro.sparsebundle." culd not be accessed (error -1)" I am backing up to a NAS drobo FS have a partitioned time machine drive was able to make a complete backup just an hour

  • Plz help me .... A question about JOPI

    Dear all, I had to do an assignment on JOPI Java object-passing Interface I saw by chance one of the member using it JOPI mp = new JOPI(args) I searched all over the net to see if there any such class implementation to JOPI or any package, but I coul