RFR: 8301121: RichTextArea Control (Incubator) [v7]
Kevin Rushforth
kcr at openjdk.org
Tue Oct 1 16:09:45 UTC 2024
On Tue, 1 Oct 2024 15:15:12 GMT, Andy Goryachev <angorya at openjdk.org> wrote:
>> This is still pending, since the docs haven't been updated. Is an exception really what you want in this case? This method is the target of a function tag: We definitely don't want to produce an exception when the user presses the DELETE key; should calling the method directly throw an exception? If so, you will need logic to detect when it is called from an input event vs directly. Whatever we decide should apply to a null model as well. Either a null model and a read-only model should both throw an exception or neither should.
>
> there is no exception thrown in `backspace()` method - are you looking at the latest version?
I was referring to your immediately preceding comment: "changed this and similar methods to throw an exception" (which, no you didn't), and then making a general comment on all of the input-mapped methods. The current impl of `backspace` does not throw an exception (good).
Btw, to reiterate and (I hope) clarify an earlier comment I made that hasn't yet been addressed, the current docs say this:
"This method does nothing if either control or the model is not editable, or the caret position is null."
That's not quite right, since the model has no "editable" attribute. I suggest this instead something like:
"This method does nothing if the control is not editable, the model is either null or not writable, or the caret position is null".
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1524#discussion_r1783083974
More information about the openjfx-dev
mailing list