Scrolling without last line

hello
I can't manage scrolling
this is quite weird. I have a button with this action:
controller.verticalScrollPosition+=controller.getScrollDelta(1);
it works fine until the last line of text (which is always invisible). Then it stops and cannot event move back by:
controller.verticalScrollPosition-=controller.getScrollDelta(1);
just won't work. textFlow is as simple as possible
textFlow = TextFilter.importToFlow(markup, TextFilter.TEXT_LAYOUT_FORMAT);
but if I import a plain text
textFlow = TextFilter.importToFlow(markup2, TextFilter.PLAIN_TEXT_FORMAT);
scrolling doesn't work at all.

Take a look at ContainerController.getContentBounds.  If that is wrong then scrolling isn't going to work.
There's been quite a bit of work on scrolling lately and a few bugs were introduced.  Expect much better results with this weeks build.
Sorry about that,
Richard

Similar Messages

  • Text Area Problem. Last Line not displayed

    HI,
    I am using TextArea component in the MXML script. We are having the problem of not displaying the last line in textarea. The textarea has scroll also. But, when scrolling only last line is not displayed and we have to see only by moving the mouse to component. We want to see all the text only by scrolling the bar. Please help me to resolve this issue.
    Thanks,
    Krishna

    Hi,
    Please check once your transport log, wether it was tranported correctly or not.
    Regards,
    Kumar

  • Delete last line of a textfile without putting the whole file in memory

    Hello!
    I want to delete the last line of a text file without loading the whole text file into thememory. My problem is as follows:
    A algorithm generates output that has to be written into a text file. This happens periodically - the output goes straight into a xml file. The xml file looks like this:
    <test>
    <step>
    <time>2006-06-19 10:55:20</time>
    <result>12321</result>
    </step>
    <step>
    <time>2006-06-19 10:58:20</time>
    <result>41515</result>
    </step>
    </test>
    The XML file must be valid, so I have to delete the last line ("</test>") before I add a new <step>-section.
    Many thanks in advance
    Kind regards,
    buliwyf

    For processing in a separate tool which understands XML, then using a DTD to declare an external entity is often better - you wrap the entity in the document root element, so you can just append to the end of the file the entity references and not bother about inserting before the closing tag.
    File other app loads:
    <?xml version="1.0"?>
    <!DOCTYPE test [ <!ENTITY content SYSTEM "content.xmlfragment"> ]>
    <test>&content;</test>File content.xmlfragment which can be simple appended to:
    <step time="2006-06-19 10:55:20">12321</step>
    <step time="2007-04-09 10:55:20">12321</step>
    <step time="2008-09-26 00:03:20">12321</step>If you can't use XML to solve the problem, then you can scan backwards in the file (using random access file or file buffer) until you find a '<' character which is followed by an '/' character. You can't have CDATA after the closing tag of the document element, and comments and processing instructions have different characters following the '<'.

  • File import skips last record without blank line

    The following code works great for importing a csv file and inserting the records into tables..
    but the last record is not read unless there is a blank line after it..
    what needs to be changed so that the last line works with or without a carriage return after it..
    create or replace PACKAGE BODY "HTMLDB_TOOLS"
    AS
    TYPE varchar2_t IS TABLE OF VARCHAR2(32767) INDEX BY binary_integer;
    -- Private functions --{{{
    PROCEDURE delete_collection ( --{{{
    -- Delete the collection if it exists
    p_collection_name IN VARCHAR2
    IS
    BEGIN
    IF (htmldb_collection.collection_exists(p_collection_name))
    THEN
    htmldb_collection.delete_collection(p_collection_name);
    END IF;
    END delete_collection; --}}}
    PROCEDURE csv_to_array ( --{{{
    -- Utility to take a CSV string, parse it into a PL/SQL table
    -- Note that it takes care of some elements optionally enclosed
    -- by double-quotes.
    p_csv_string IN VARCHAR2,
    p_array OUT wwv_flow_global.vc_arr2,
    p_separator IN VARCHAR2 := ','
    IS
    l_start_separator PLS_INTEGER := 0;
    l_stop_separator PLS_INTEGER := 0;
    l_length PLS_INTEGER := 0;
    l_idx BINARY_INTEGER := 0;
    l_quote_enclosed BOOLEAN := FALSE;
    l_offset PLS_INTEGER := 1;
    BEGIN
    l_length := NVL(LENGTH(p_csv_string),0);
    IF (l_length <= 0)
    THEN
    RETURN;
    END IF;
    LOOP
    l_idx := l_idx + 1;
    l_quote_enclosed := FALSE;
    IF SUBSTR(p_csv_string, l_start_separator + 1, 1) = '"'
    THEN
    l_quote_enclosed := TRUE;
    l_offset := 2;
    l_stop_separator := INSTR(p_csv_string, '"', l_start_separator + l_offset, 1);
    ELSE
    l_offset := 1;
    l_stop_separator := INSTR(p_csv_string, p_separator, l_start_separator + l_offset, 1);
    END IF;
    IF l_stop_separator = 0
    THEN
    l_stop_separator := l_length + 1;
    END IF;
    p_array(l_idx) := (SUBSTR(p_csv_string, l_start_separator + l_offset,(l_stop_separator - l_start_separator - l_offset)));
    EXIT WHEN l_stop_separator >= l_length;
    IF l_quote_enclosed
    THEN
    l_stop_separator := l_stop_separator + 1;
    END IF;
    l_start_separator := l_stop_separator;
    END LOOP;
    END csv_to_array; --}}}
    PROCEDURE get_records(p_blob IN blob,p_records OUT varchar2_t) --{{{
    IS
    l_record_separator VARCHAR2(2) := chr(13)||chr(10);
    l_last INTEGER;
    l_current INTEGER;
    BEGIN
    -- Sigh, stupid DOS/Unix newline stuff. If HTMLDB has generated the file,
    -- it will be a Unix text file. If user has manually created the file, it
    -- will have DOS newlines.
    -- If the file has a DOS newline (cr+lf), use that
    -- If the file does not have a DOS newline, use a Unix newline (lf)
    IF (NVL(dbms_lob.instr(p_blob,utl_raw.cast_to_raw(l_record_separator),1,1),0)=0)
    THEN
    l_record_separator := chr(10);
    END IF;
    l_last := 1;
    LOOP
    l_current := dbms_lob.instr( p_blob, utl_raw.cast_to_raw(l_record_separator), l_last, 1 );
    EXIT WHEN (nvl(l_current,0) = 0);
    p_records(p_records.count+1) := utl_raw.cast_to_varchar2(dbms_lob.substr(p_blob,l_current-l_last,l_last));
    l_last := l_current+length(l_record_separator);
    END LOOP;
    END get_records; --}}}
    -- Utility functions --{{{
    PROCEDURE parse_textarea ( --{{{
    p_textarea IN VARCHAR2,
    p_collection_name IN VARCHAR2
    IS
    l_index INTEGER;
    l_string VARCHAR2(32767) := TRANSLATE(p_textarea,chr(10)||chr(13)||' ,','@@@@');
    l_element VARCHAR2(100);
    BEGIN
    l_string := l_string||'@';
    htmldb_collection.create_or_truncate_collection(p_collection_name);
    LOOP
    l_index := instr(l_string,'@');
    EXIT WHEN NVL(l_index,0)=0;
    l_element := substr(l_string,1,l_index-1);
    IF (trim(l_element) IS NOT NULL)
    THEN
    htmldb_collection.add_member(p_collection_name,l_element);
    END IF;
    l_string := substr(l_string,l_index+1);
    END LOOP;
    END parse_textarea; --}}}
    PROCEDURE parse_file( --{{{
    p_file_name IN VARCHAR2,
    p_collection_name IN VARCHAR2,
    p_headings_item IN VARCHAR2,
    p_columns_item IN VARCHAR2,
    p_ddl_item IN VARCHAR2,
    p_table_name IN VARCHAR2 DEFAULT NULL
    IS
    l_blob blob;
    l_records varchar2_t;
    l_record wwv_flow_global.vc_arr2;
    l_datatypes wwv_flow_global.vc_arr2;
    l_headings VARCHAR2(4000);
    l_columns VARCHAR2(4000);
    l_seq_id NUMBER;
    l_num_columns INTEGER;
    l_ddl VARCHAR2(4000);
    BEGIN
    IF (p_table_name is not null)
    THEN
    l_ddl := 'insert into '||p_table_name||' '||
    'select '||v(p_columns_item)||' '||
    'from htmldb_collections '||
    'where seq_id > 0 and collection_name='''||p_collection_name||'''';
    execute immediate l_ddl;
    RETURN;
    END IF;
    BEGIN
    select blob_content into l_blob from wwv_flow_files
    where name=p_file_name;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    raise_application_error(-20000,'File not found, id='||p_file_name);
    END;
    get_records(l_blob,l_records);
    IF (l_records.count < 2)
    THEN
    raise_application_error(-20000,'File must have at least 2 ROWS, ONE HEADER and ONE OR MORE DATA, id='||p_file_name);
    END IF;
    -- Initialize collection
    htmldb_collection.create_or_truncate_collection(p_collection_name);
    -- Get column headings
    csv_to_array(l_records(1),l_record);
    l_num_columns := l_record.count;
    if (l_num_columns > 50) then
    raise_application_error(-20000,'Max. of 50 columns allowed, id='||p_file_name);
    end if;
    -- Get column headings and names
    FOR i IN 1..l_record.count
    LOOP
    l_headings := l_headings||':'||l_record(i);
    l_columns := l_columns||',c'||lpad(i,3,'0');
    END LOOP;
    l_headings := ltrim(l_headings,':');
    l_columns := ltrim(l_columns,',');
    htmldb_util.set_session_state(p_headings_item,l_headings);
    htmldb_util.set_session_state(p_columns_item,l_columns);
    -- Save data into specified collection
    FOR i IN 2..l_records.count
    LOOP
    csv_to_array(l_records(i),l_record);
    l_seq_id := htmldb_collection.add_member(p_collection_name,'dummy');
    FOR i IN 1..l_record.count
    LOOP
    htmldb_collection.update_member_attribute(
    p_collection_name=> p_collection_name,
    p_seq => l_seq_id,
    p_attr_number => i,
    p_attr_value => l_record(i)
    END LOOP;
    END LOOP;
    DELETE FROM wwv_flow_files WHERE name=p_file_name;
    END;
    BEGIN
    NULL;
    END;

    found someone that helped me.. here was the fix:
    l_current := dbms_lob.instr( p_blob, utl_raw.cast_to_raw(l_record_separator), l_last, 1 );
    -- START of new code, lines above as per existing
    IF nvl(l_current,0) = 0 AND LENGTH(TRIM(utl_raw.cast_to_varchar2(dbms_lob.substr(p_blob,32767,l_last)))) > 0 THEN
    p_records(p_records.count+1) := utl_raw.cast_to_varchar2(dbms_lob.substr(p_blob,32767,l_last));
    END IF;
    -- END of new code,, lines below as per existing
    EXIT WHEN (nvl(l_current,0) = 0);

  • Scrolling JTextArea to Last Line

    Hi Gurus:
    I have seached the forum, but didn't find a solution to this problem. It must be something really simple that I'm not getting!
    I have a JTextArea with JScrollbar attached to it. My application appends output text to this text area for user information. I would like to scroll the text up, so that the last line of text is always visible in that area.
    Currently, this is what I'm doing:
    txtOutput.setCaretPosition(txtOutput.getText().length());where txtOutput is the JTextArea in question.
    This does scroll the text up (as desired), however, it also scrolls the text leftwards to show the latest text (not desired), since that's what I asked it to do. How can I get it to scroll back to the top of the line? Or should I use some other approach?
    Regards,
    Kamran

    If I understand your problem you should be able to use the following methods from the JTextArea API:
    int getLineCount() - Determines the number of lines contained in the area.
    int getLineStartOffset(int line) - Determines the offset of the start of the given line.
    You should be able to do something like:
    caretPosition = textArea.getLineStartOffset( getLineCount() );
    This should position the caret to the beginning of the last line.
    BTW - JTextArea is a Swing Component. There is a whole forum devoted to Swing questions. You should post your question there - you might get an answer faster. This will also improve your searches as the search function only search the current forum you are looking at.

  • SQL window keep scrolling down to the last line

    Is there a setting that will keep the SQL window from always scrolling down to the last line in the window? This feature is very annoying when trying to review code that is longer that the window size.

    You'd have to give more details as to what's your environment and what exactly is failing, but FWIW my tables' SQL tabs behave the same as all others; they start up scrolled up, and can be scrolled as you whish...
    K.

  • How to upload CSV file w/o ,, for the last line

    Hi Experts,
    As part of one interface uploading the csv file (4coulmns) manually using the TCODE: CSCA_FILE_COPY.
    After uploading when i see in the AL11 as it is csv file it is filling the , in each space.
    But my issue while running the interface (because of logic in it) checking for the hash total in the last line where (record count, hash total) only 2 items should come but because of manual upload adding the (record count, hash total, , ,) another two spaces.
    Where program not moving further becasue the it is alway comparing the amounts (1000.00 not matching with 1000.00, , ) it is not processing. In production files directly load in to unix server so no issues and i can't ask to change the program code...because iam not following the process. As part of testing i've to do manually only.
    Please suggest the workaround for this.
    Is it possible to change the contents directly in AL11 directly....then HOW ?
    or
    How to create a csv file w/o , , in the last line (may be it is not possible) ?
    Thanks for your replies in advance.
    Regards
    VVR

    I don't think you can edit from AL11, nor creating a CSV without those commas at the end because are created to state fields with empty value.
    You have 6 columns filled with values but for the last line you only fill the first four. It is expected to appear , , for the last 2 columns on the last line.
    I can only suggest keep doing it manually before uploading the CSV file... or... you are saying you can't change the program.
    How about upload all CSV files... then writing another program to get those files from AL11 and delete the spare commas at the end line?
    Cheers,
    Andres.

  • Gui_download - last line

    Hi,
    The function module gui_download always create a blank line at the end of file created.
    But I need a file without this last line.
    How can I do that ?
    Thanks !

    I solved this problem with BIN mode.
    See this code example
    DATA: FILESIZE TYPE I.
    CALL FUNCTION 'SCMS_TEXT_TO_BINARY'
    IMPORTING
       OUTPUT_LENGTH         = filesize
      TABLES
        TEXT_TAB              =   i_record
        BINARY_TAB            = i_Record
          filesize = filesize - 1. "TRUNCATED LAST LINE!!!
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          BIN_FILESIZE = filesize
          filename                = l_file
          filetype                = 'BIN'
         TRUNC_TRAILING_BLANKS = 'X'
         TRUNC_TRAILING_BLANKS_EOL = 'X'
         WRITE_LF_AFTER_LAST_LINE = ' '
       TABLES
          data_tab                = i_record
    Hope this can help you.

  • Can I align the last line of a text container to to bottom of a container?

    Is it possible to take the last line in a text container and vertically align it to the bottom? I'm aware that I can justify the entire text container vertically to achieve this effect. However, this means tha every line in the container is now spaced out with increased leading.
    Here's a screen capture of what I mean.
    On the right is a text container without any vertical justification and sized to fit the text. On the left is a text container that I've sized to match the height of the right container. In order to get the last line to align to the bottom I used the Justify vertically option. But my bullets are now spread out.
    Basically I just want the last line aligned to the bottom and the rest of the text above it to be aligned to the top.
    Is there anyway to do this with just one text container? Or will I be forced to used two text containers?
    I'm using InDesign CS5 if that matters.

    I think I'd do this with a two-cell table.

  • JSP for Vcard cannot strip carriage return in the last line of the file.

    I am using JSP to output a Vcard (http://en.wikipedia.org/wiki/VCard)
    The following code works great in Windows but fails on the mac:
    <%@ page contentType="text/x-vcard" %><%--
    --%><%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %><%--
    --%><%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %><%--
    --%>BEGIN:VCARD
    VERSION:2.1
    <c:choose><%--
    --%><c:when test="${not ((empty param.lan) and (empty param.fin)) }"><%--
    --%>N:${param.lan};${param.fin}
    FN:${param.fin} ${param.lan}
    </c:when><%--
    --%><c:otherwise><%--
    --%>FN:${param.org}
    </c:otherwise><%--
    --%></c:choose><%--
    --%>ORG:${param.org}
    TITLE:${param.title}
    TEL;WORK;VOICE:${param.phwork}
    ADR;WORK:;;${param.st};${param.city};${param.state};${param.zip};
    EMAIL;PREF;INTERNET:${param.email}
    REV:20080424T195243Z
    <c:out value="${fn:replace('END:VCARD','\\\r','')}" escapeXml="false"/>After some tests, I discovered that Mac (I used Tiger, latest update, not Leopard) needs extra white space and carriage returns stripped off. Once this is achieved, the vcard will automatically import into Address Book. I have followed other forums which advice on using JSP comments as in the code above. But for some strange reason the last line of the JSP outputs an extra carraige return. How do I get rid of the carriage return at the end of the file? the replace function from JSTL is not working.
    Edited by: shogo2040 on Dec 18, 2008 7:11 PM : I added more detail to the Subject

    I originally had that END:VCARD without any carriage return.
    But I still get an extra carriage return at the end when the JSP renders to VCF
    I'm using Tomcat running on Linux.
    I found this, article which implies (but does not explicitly say) JSP in general adds a newline to the last line:
    http://www.caucho.com/resin-3.0/jsp/faq.xtp (But its not tomcat either, so maybe this info is irrelevant).
    Edited by: shogo2040 on Dec 22, 2008 3:31 PM - changed rendered to VCF from rendered to JSP

  • Boris Title Crawl Stop at last line

    I have the Boris Title Crawl that comes with FCP version 6. I have a "Credits" list at the end of the video with my company at the last line.
    TC continues (while the music is playing) until the last line scrolls off of the screen (I am using "Roll")
    I cant figure out how to make it stop rolling when the last line is at the middle of the screen.
    Any help would be appreciated

    Hi -
    Use the Percent Completion Slider. It is at the bottom of the Controls tab for your Title Crawl/Roll clip. You might need to scroll the controls window down to see it, It is near the bottom of the Controls pane.
    Start your roll by placing a keyframe with 0 Percent Complete, then move your playhead to where you want the roll to stop and make another keyframe. Adjust the slider till the line of type is in the position you want. The Roll will stop there. If you control-click on the second keyframe, you can spline the motion so that the roll will smoothly come to a stop.
    !http://www.spotsbeforeyoureyes.com/BorisRollPercentComplete.jpg!
    Hope this helps.

  • How to set a JScrollPane always display the last line?

    I have put a JTextArea in a JScrollPane.
    Whenever I append a new line of sentence to the JTextArea, the JScrollPane only shorten the vertical scroll bar.
    Is there any command that can scroll down to the last line whenever I append a new sentence to the JTextArea?

    I have tried to add the line you shown, but it can just show the second last line. It cannot scroll down to the last line.
    e.g. I have these message:
    AAA
    BBB
    CCC
    If the message board can only show 3 lines and I enter one more line "DDD", then the last line will be shown is CCC. I need to scroll down a bit more myself to see DDD. If I scroll to the top and enter another line"EEE", it will scroll down to show "DDD" but not "EEE".

  • Printing in Mail Cutting last line on page in half

    I have a friend, using a Macbook Pro 15", who has noticed since the last upgrade to 10.9.4 that whenever he prints a multi page document in OS X mail that the last line on the page prints half on one page and half on the next.  Default paper size is A4 (standard in NZ). Text also splits if print to Preview. Discovered it the default paper size is changed to US letter that text no longer splits.
    To try and find out what could be causing this I tried to duplicate the problem in my MacBook Pro 17"  also up to date with  OS X 10.9.4. On my machine with paper default set to A4 prints multi page document without cutting the last line, i.e., paginates between lines. Changed my default us US Letter and it split the last line in half.  Same problem but with different form default.
    Any one know what setting is controlling whether it paginates between lines or on the line? How to stop mail from cutting the last line on the page up with half on each page?

    The line spacing isn't exact by default. I presume you use Pages 08 or 09. In the Inspector > T tab > Line < Click on the small arrows to the right and choose Exactly

  • How to make the last line of the textarea visible all the time?

    Hello,
    I am making an online chat application in JSP and XHTML. The chat log and online users� names textareas are refreshed every 5 seconds. When it comes to many messages in the chat log textarea, the scrollbar appears. Then, every time the chat log textarea is refreshed, I need to move the scrollbar down to see the last line of the textarea.
    Are there any ideas how to make the last line of the textarea visible all the time without moving the scrollbar?
    Thanks in advance.
    Dan

    I put the below code on the page, but it didn't work.
    Are there any ideas? Thanks.
    <table border="0" cellspacing="1">
    <tr>
    <th>Chat Log</th>
    <th>Users now online</th>
    </tr>
    <tr>
    <td><textarea rows="20" cols="60" name = "messages" readonly = "readonly"><%= texts %></textarea></td>
    <td><textarea rows="20" cols="20" name = "names" readonly = "readonly"><%= names %></textarea></td>
    </tr>
    </table>
    <script type="text/javascript">
    <!--
    document.messages.scrollIntoView(false);
    //-->
    </script>

  • How to set scrolledPane/textArea to display last lines?

    I have a JTextArea in a JScrollPane.
    I'm adding to the text area and the information scrolls off the visible portion of the screen.
    How can I force the scrolling to always display the last lines at the bottom of the screen when they are added?
    Thanks.

    See [url http://www.camick.com/java/blog.html?name=text-area-scrolling]Text Area Scrolling

Maybe you are looking for