bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug swing/27203] New: document updates with active documentfilter may c


From: thebohemian at gmx dot net
Subject: [Bug swing/27203] New: document updates with active documentfilter may cause exceptions
Date: 18 Apr 2006 20:05:47 -0000

Code like this will fail when the Document has an active DocumentFilter which
absorbs the inserted text:

---

// Insert new text.
doc.insertString(start, content, null);

// Set dot to new position,
dot = start + content.length();
setCaretPosition(dot);

---

The problem is that the pre-calculated caret position may not be valid because
the DocumentFilter may have caused that.

First thing is to find out how the RI handles such cases (eg. where does it
place the caret) and then find all occurences of code like this. Unfortunately
this may be spread across different classes: JTextComponent, JTextField,
JTextField and probably DefaultEditorKit (the TextActions within it).


-- 
           Summary: document updates with active documentfilter may cause
                    exceptions
           Product: classpath
           Version: 0.90
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: swing
        AssignedTo: thebohemian at gmx dot net
        ReportedBy: thebohemian at gmx dot net


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27203





reply via email to

[Prev in Thread] Current Thread [Next in Thread]