Re: [jfx15] RFR: 8176270: Adding ChangeListener to TextField.selectedTextProperty causes StringOutOfBoundsException [v8]

2020-07-10 Thread Kevin Rushforth
On Fri, 10 Jul 2020 06:14:15 GMT, Robert Lichtenberger wrote: >> This PR fixes JDK-8176270 by clamping the end index of the selected text to >> the length of the text. > > Robert Lichtenberger has updated the pull request incrementally with one > additional commit since the last revision: >

Re: [jfx15] RFR: 8176270: Adding ChangeListener to TextField.selectedTextProperty causes StringOutOfBoundsException [v8]

2020-07-10 Thread Kevin Rushforth
On Fri, 10 Jul 2020 11:52:41 GMT, Ajit Ghaisas wrote: >> Robert Lichtenberger has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8176270: Adding ChangeListener to TextField.selectedTextProperty causes >> StringOutOfBoundsException >>

Re: [jfx15] RFR: 8176270: Adding ChangeListener to TextField.selectedTextProperty causes StringOutOfBoundsException [v8]

2020-07-10 Thread Ajit Ghaisas
On Fri, 10 Jul 2020 06:14:15 GMT, Robert Lichtenberger wrote: >> This PR fixes JDK-8176270 by clamping the end index of the selected text to >> the length of the text. > > Robert Lichtenberger has updated the pull request incrementally with one > additional commit since the last revision: >

Re: [jfx15] RFR: 8176270: Adding ChangeListener to TextField.selectedTextProperty causes StringOutOfBoundsException

2020-07-10 Thread Robert Lichtenberger
On Thu, 2 Jul 2020 23:39:58 GMT, Kevin Rushforth wrote: >> seeing that you are working at it (and still without too close a look, sry >> ;) - we need more tests about the >> notifications of all properties involved: text, selectedText, indexRange >> (anything else?). The things to test are >>

Re: [jfx15] RFR: 8176270: Adding ChangeListener to TextField.selectedTextProperty causes StringOutOfBoundsException [v8]

2020-07-10 Thread Robert Lichtenberger
> This PR fixes JDK-8176270 by clamping the end index of the selected text to > the length of the text. Robert Lichtenberger has updated the pull request incrementally with one additional commit since the last revision: 8176270: Adding ChangeListener to TextField.selectedTextProperty causes

Re: [jfx15] RFR: 8176270: Adding ChangeListener to TextField.selectedTextProperty causes StringOutOfBoundsException [v7]

2020-07-10 Thread Robert Lichtenberger
On Thu, 9 Jul 2020 20:29:51 GMT, Kevin Rushforth wrote: >> Robert Lichtenberger has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8176270: Adding ChangeListener to TextField.selectedTextProperty causes >> StringOutOfBoundsException >>

Re: RFR: 8176270: Adding ChangeListener to TextField.selectedTextProperty causes StringOutOfBoundsException [v7]

2020-07-09 Thread Kevin Rushforth
On Thu, 2 Jul 2020 05:29:05 GMT, Robert Lichtenberger wrote: >> This PR fixes JDK-8176270 by clamping the end index of the selected text to >> the length of the text. > > Robert Lichtenberger has updated the pull request incrementally with one > additional commit since the last revision: > >

Re: RFR: 8176270: Adding ChangeListener to TextField.selectedTextProperty causes StringOutOfBoundsException [v6]

2020-07-02 Thread Kevin Rushforth
On Tue, 30 Jun 2020 23:14:52 GMT, Kevin Rushforth wrote: >> Robert Lichtenberger has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8176270: Adding ChangeListener to TextField.selectedTextProperty causes >> StringOutOfBoundsException >>

Re: RFR: 8176270: Adding ChangeListener to TextField.selectedTextProperty causes StringOutOfBoundsException [v6]

2020-07-01 Thread Robert Lichtenberger
On Tue, 30 Jun 2020 23:05:40 GMT, Kevin Rushforth wrote: >> Robert Lichtenberger has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8176270: Adding ChangeListener to TextField.selectedTextProperty causes >> StringOutOfBoundsException >>

Re: RFR: 8176270: Adding ChangeListener to TextField.selectedTextProperty causes StringOutOfBoundsException [v7]

2020-07-01 Thread Robert Lichtenberger
> This PR fixes JDK-8176270 by clamping the end index of the selected text to > the length of the text. Robert Lichtenberger has updated the pull request incrementally with one additional commit since the last revision: 8176270: Adding ChangeListener to TextField.selectedTextProperty causes

Re: RFR: 8176270: Adding ChangeListener to TextField.selectedTextProperty causes StringOutOfBoundsException [v6]

2020-06-30 Thread Kevin Rushforth
On Tue, 16 Jun 2020 09:03:35 GMT, Robert Lichtenberger wrote: >> This PR fixes JDK-8176270 by clamping the end index of the selected text to >> the length of the text. > > Robert Lichtenberger has updated the pull request incrementally with one > additional commit since the last revision: >

Re: [Rev 05] RFR: 8176270: Adding ChangeListener to TextField.selectedTextProperty causes StringOutOfBoundsException

2020-06-16 Thread Robert Lichtenberger
> This PR fixes JDK-8176270 by clamping the end index of the selected text to > the length of the text. Robert Lichtenberger has updated the pull request incrementally with one additional commit since the last revision: 8176270: Adding ChangeListener to TextField.selectedTextProperty causes

Re: RFR: 8176270: Adding ChangeListener to TextField.selectedTextProperty causes StringOutOfBoundsException

2020-06-15 Thread Jeanette Winzenburg
On Mon, 15 Jun 2020 05:36:35 GMT, Robert Lichtenberger wrote: >> good direction, I think :) >> >> Didn't look too closely, just added your changes and run the tests - getting >> a StringIndexOutofBounds at >> TextInputControlTest.test_jdk_8171229_replaceText(TextInputControlTest.java:1862) >>

Re: [Rev 04] RFR: 8176270: Adding ChangeListener to TextField.selectedTextProperty causes StringOutOfBoundsException

2020-06-15 Thread Robert Lichtenberger
> This PR fixes JDK-8176270 by clamping the end index of the selected text to > the length of the text. Robert Lichtenberger has updated the pull request incrementally with one additional commit since the last revision: 8176270: Adding ChangeListener to TextField.selectedTextProperty causes

Re: RFR: 8176270: Adding ChangeListener to TextField.selectedTextProperty causes StringOutOfBoundsException

2020-06-14 Thread Robert Lichtenberger
On Thu, 11 Jun 2020 14:39:08 GMT, Jeanette Winzenburg wrote: > good direction, I think :) > > Didn't look too closely, just added your changes and run the tests - getting > a StringIndexOutofBounds at > TextInputControlTest.test_jdk_8171229_replaceText(TextInputControlTest.java:1862) > (no

Re: RFR: 8176270: Adding ChangeListener to TextField.selectedTextProperty causes StringOutOfBoundsException

2020-06-11 Thread Jeanette Winzenburg
On Thu, 28 May 2020 06:50:57 GMT, Robert Lichtenberger wrote: >> Most of the time, value in >> javafx.scene.control.TextInputControl.replaceText(int, int, String, int, >> int) will already >> be filtered (e.g. linebreaks in TextField) In that case, adjustmentAmount >> will be zero and one

Re: RFR: 8176270: Adding ChangeListener to TextField.selectedTextProperty causes StringOutOfBoundsException

2020-05-28 Thread Robert Lichtenberger
On Wed, 27 May 2020 12:11:48 GMT, Robert Lichtenberger wrote: >> you are hacking around ;) >> >> doSelect _must not_ be called somewhere "in-between" changing the text: the >> api doc clearly states that the >> caret/anchor coordinates are the _new_ coordinates, that is after all >> changes

Re: [Rev 02] RFR: 8176270: Adding ChangeListener to TextField.selectedTextProperty causes StringOutOfBoundsException

2020-05-27 Thread Robert Lichtenberger
> This PR fixes JDK-8176270 by clamping the end index of the selected text to > the length of the text. Robert Lichtenberger has updated the pull request incrementally with one additional commit since the last revision: 8176270: Adding ChangeListener to TextField.selectedTextProperty causes

Re: RFR: 8176270: Adding ChangeListener to TextField.selectedTextProperty causes StringOutOfBoundsException

2020-05-27 Thread Jeanette Winzenburg
On Wed, 27 May 2020 07:50:00 GMT, Robert Lichtenberger wrote: >> Reopening the pull request, since PR #73 has been closed. > > Clearing the selection temporarily works fine to prevent the > StringOutOfBoundsException but will also change > selectionProperty to reflect the selection being 0/0

Re: RFR: 8176270: Adding ChangeListener to TextField.selectedTextProperty causes StringOutOfBoundsException

2020-05-27 Thread Robert Lichtenberger
On Wed, 27 May 2020 07:37:13 GMT, Robert Lichtenberger wrote: >> We're in the process of finishing our products' release. If I find time >> I will try and give this (rather nasty) Problem another shot. >> >> On 2020-05-08 20:51, Kevin Rushforth wrote: >>> >>> @effad

Re: [Rev 01] RFR: 8176270: Adding ChangeListener to TextField.selectedTextProperty causes StringOutOfBoundsException

2020-05-27 Thread Robert Lichtenberger
> This PR fixes JDK-8176270 by clamping the end index of the selected text to > the length of the text. Robert Lichtenberger has updated the pull request incrementally with one additional commit since the last revision: 8176270: Adding ChangeListener to TextField.selectedTextProperty causes

Re: RFR: 8176270: Adding ChangeListener to TextField.selectedTextProperty causes StringOutOfBoundsException

2020-05-27 Thread Robert Lichtenberger
On Mon, 11 May 2020 04:54:31 GMT, Robert Lichtenberger wrote: >> @effad I just closed PR #73 due to inactivity. If you are interested >> interested in pursuing this, go ahead and reopen >> this (although you would need to address the feedback that clamping is >> insufficient). > > We're in

Re: RFR: 8176270: Adding ChangeListener to TextField.selectedTextProperty causes StringOutOfBoundsException

2020-05-10 Thread Robert Lichtenberger
On Fri, 8 May 2020 18:50:57 GMT, Kevin Rushforth wrote: >> I wasn't aware of PR #73, I only saw the (very old) issue in the JDK Bug >> System and started to look into the issue. >> The fact that two different people start to look into the same issue shows >> it is important however :-). >>

Re: [Closed] RFR: 8176270: Adding ChangeListener to TextField.selectedTextProperty causes StringOutOfBoundsException

2020-05-08 Thread Oliver Kopp
On Sat, 21 Dec 2019 15:36:14 GMT, Oliver Kopp wrote: > This is a WIP PR. Requesting for comments. > > I could not replicate the test given at > https://bugs.openjdk.java.net/browse/JDK-8176270 without TestFX. I > nevertheless > let my try to replicate the @Test things in here. > The fix is

Re: RFR: 8176270: Adding ChangeListener to TextField.selectedTextProperty causes StringOutOfBoundsException

2020-05-08 Thread Kevin Rushforth
On Fri, 6 Mar 2020 06:00:36 GMT, Robert Lichtenberger wrote: >> I have exactly the same question. >> >> In general, it's better to work with the author of an existing PR instead of >> creating a new one. If the original PR #73 >> is completely stalled, then it might make sense, but not until

Re: [Closed] RFR: 8176270: Adding ChangeListener to TextField.selectedTextProperty causes StringOutOfBoundsException

2020-05-08 Thread Robert Lichtenberger
On Thu, 5 Mar 2020 16:01:10 GMT, Robert Lichtenberger wrote: > This PR fixes JDK-8176270 by clamping the end index of the selected text to > the length of the text. This pull request has been closed without being integrated. - PR: https://git.openjdk.java.net/jfx/pull/138

Re: RFR: 8176270: Adding ChangeListener to TextField.selectedTextProperty causes StringOutOfBoundsException

2020-05-08 Thread Kevin Rushforth
On Tue, 14 Apr 2020 11:47:21 GMT, Kevin Rushforth wrote: >> Just a comment on how to add a failing test: we can replace the actual >> typing (in the TestFx context) by >> programmatically replacing the selection, actually, it doesn't even need the >> skin (so no scene nor parent) because all

Re: RFR: 8176270: Adding ChangeListener to TextField.selectedTextProperty causes StringOutOfBoundsException

2020-04-14 Thread Kevin Rushforth
On Sun, 9 Feb 2020 14:40:25 GMT, Jeanette Winzenburg wrote: >> I left comments inline. This will need changes. Also, you will need to >> provide a test that fails without the fix and >> passes with the fix. > > Just a comment on how to add a failing test: we can replace the actual > typing

Re: RFR: 8176270: Adding ChangeListener to TextField.selectedTextProperty causes StringOutOfBoundsException

2020-03-06 Thread Kevin Rushforth
On Fri, 6 Mar 2020 06:00:36 GMT, Robert Lichtenberger wrote: >> I have exactly the same question. >> >> In general, it's better to work with the author of an existing PR instead of >> creating a new one. If the original PR #73 is completely stalled, then it >> might make sense, but not until

Re: RFR: 8176270: Adding ChangeListener to TextField.selectedTextProperty causes StringOutOfBoundsException

2020-03-05 Thread Robert Lichtenberger
On Thu, 5 Mar 2020 18:00:25 GMT, Kevin Rushforth wrote: >> why a second pr for the same issue (see >> https://github.com/openjdk/jfx/pull/73)? particularly one that doesn't do >> much more/else/better (than clamping, which isn't good enough)? > > I have exactly the same question. > > In

Re: RFR: 8176270: Adding ChangeListener to TextField.selectedTextProperty causes StringOutOfBoundsException

2020-03-05 Thread Kevin Rushforth
On Thu, 5 Mar 2020 17:01:25 GMT, Jeanette Winzenburg wrote: >> This PR fixes JDK-8176270 by clamping the end index of the selected text to >> the length of the text. > > why a second pr for the same issue (see > https://github.com/openjdk/jfx/pull/73)? particularly one that doesn't do > much

Re: RFR: 8176270: Adding ChangeListener to TextField.selectedTextProperty causes StringOutOfBoundsException

2020-03-05 Thread Jeanette Winzenburg
On Thu, 5 Mar 2020 16:01:10 GMT, Robert Lichtenberger wrote: > This PR fixes JDK-8176270 by clamping the end index of the selected text to > the length of the text. why a second pr for the same issue (see https://github.com/openjdk/jfx/pull/73)? particularly one that doesn't do much

RFR: 8176270: Adding ChangeListener to TextField.selectedTextProperty causes StringOutOfBoundsException

2020-03-05 Thread Robert Lichtenberger
This PR fixes JDK-8176270 by clamping the end index of the selected text to the length of the text. - Commits: - e78e8793: 8176270: Adding ChangeListener to TextField.selectedTextProperty causes StringOutOfBoundsException - d849c67c: Merge remote-tracking branch 'upstream/master'

Re: RFR: 8176270: Adding ChangeListener to TextField.selectedTextProperty causes StringOutOfBoundsException

2020-02-12 Thread Jeanette Winzenburg
On Fri, 7 Feb 2020 18:04:35 GMT, Kevin Rushforth wrote: >> This is a WIP PR. Requesting for comments. >> >> I could not replicate the test given at >> https://bugs.openjdk.java.net/browse/JDK-8176270 without TestFX. I >> nevertheless let my try to replicate the @Test things in here. >> >>

Re: RFR: 8176270: Adding ChangeListener to TextField.selectedTextProperty causes StringOutOfBoundsException

2020-02-09 Thread Jeanette Winzenburg
On Fri, 7 Feb 2020 18:12:23 GMT, Kevin Rushforth wrote: >> This is a WIP PR. Requesting for comments. >> >> I could not replicate the test given at >> https://bugs.openjdk.java.net/browse/JDK-8176270 without TestFX. I >> nevertheless let my try to replicate the @Test things in here. >> >>

Re: RFR: 8176270: Adding ChangeListener to TextField.selectedTextProperty causes StringOutOfBoundsException

2020-02-07 Thread Kevin Rushforth
On Sat, 21 Dec 2019 15:36:14 GMT, Oliver Kopp wrote: > This is a WIP PR. Requesting for comments. > > I could not replicate the test given at > https://bugs.openjdk.java.net/browse/JDK-8176270 without TestFX. I > nevertheless let my try to replicate the @Test things in here. > > The fix is

RFR: 8176270: Adding ChangeListener to TextField.selectedTextProperty causes StringOutOfBoundsException

2020-02-07 Thread Oliver Kopp
This is a WIP PR. Requesting for comments. I could not replicate the test given at https://bugs.openjdk.java.net/browse/JDK-8176270 without TestFX. I nevertheless let my try to replicate the @Test things in here. The fix is just a wild guess without really understanding the side effects of