RTextArea needs ConfigurableCaret

Post a reply

Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :arrow: :| :mrgreen: :geek: :ugeek:
BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON
Topic review
   

Expand view Topic review: RTextArea needs ConfigurableCaret

Re: RTextArea needs ConfigurableCaret

Post by robert » Fri Nov 23, 2012 4:41 pm

Awesome! I've already put it into the new 2.0.5 release. :)

Re: RTextArea needs ConfigurableCaret

Post by stefan1 » Fri Nov 23, 2012 2:34 pm

Great!

The changes work as expected, no exception is thrown any more.

Thanks, Stefan

Re: RTextArea needs ConfigurableCaret

Post by robert » Tue Nov 20, 2012 2:20 pm

I've also created a patch file you can use to test with, if that's easier (it's actually just small edits to 2 files). Can you try this?

http://fifesoft.com/temp/rsta_ConfigurableCaret_issue.patch

Re: RTextArea needs ConfigurableCaret

Post by Guest » Tue Nov 20, 2012 1:32 pm

Thanks!

Unfortunately we extend AbstractTokenMakerFactory and thus still use createTokenMakerKeyToClassNameMap - as a consequence I can not test your new jar file right now.

It will take me some time to do the testing, I will let you know about my findings as soon as possible.

Re: RTextArea needs ConfigurableCaret

Post by robert » Tue Nov 20, 2012 2:56 am

You must be doing something to enter "composed text mode," which is one of those magical things still private/package-private in Swing. Perhaps your keyboard is a non-English one? I'm not sure under what scenarios this occurs.

In any case, I believe the only way around this, and still allow for proper input from all input devices, is to remove the hard requirement on ConfigurableCaret. Can you try downloading and using this jar:

http://fifesoft.com/temp/rsyntaxtextarea.jar

and see if that fixes the problem? The only strange thing that may happen is you see the caret change appearance slightly, from its two pixel-wide bar (by default at least) to the standard Swing 1-pixel caret, *if* and *when* you're going into "composed text mode" for whatever reason. Insert/overwrite modes and all other functionality should still work as expected though, I believe.

I haven't committed this change yet; please let me know whether it fixes the problem for you and I'll push it to the SVN repository.

Re: RTextArea needs ConfigurableCaret

Post by Guest » Mon Nov 19, 2012 10:59 am

Hi,

yes, of course I could test.

Stefan

Re: RTextArea needs ConfigurableCaret

Post by robert » Sat Nov 17, 2012 3:51 pm

I just blew some money on a shiny new Macbook Pro, and I don't see this problem with either the 2.0.0 release in the applet demo, or with the latest in the SVN trunk. So I'm somewhat at a loss here.

I *could* try changing setCaret() so that, instead of throwing an exception on receiving a non-ConfigurableCaret, we instead simply ignore the Caret change. There is a small chance that this might break other Swing-internal stuff (though I doubt it, but there are still a few hard-coded dependencies and other bits of fun in Swing).

If I cobble this up for you, can you test it out for me and report back if it fixes your problem, and if you see any side effects from it?

Re: RTextArea needs ConfigurableCaret

Post by stefan1 » Fri Nov 16, 2012 11:19 pm

Java(TM) SE Runtime Environment (build 1.6.0_35-b10-428-10M3811)
Java HotSpot(TM) 64-Bit Server VM (build 20.10-b01-428, mixed mode)

Stefan

Re: RTextArea needs ConfigurableCaret

Post by robert » Sun Nov 11, 2012 4:29 am

Hopefully it isn't a problem on all Macs. Unfortunately, I've been without a Mac to test on for months now. I hope to get one soon, which will give me a test case.

Just so I have all the details, I assume this is the last Apple JDK? Or are you using OpenJDK?

Re: RTextArea needs ConfigurableCaret

Post by Stefan1 » Thu Nov 08, 2012 7:34 pm

No, no Asian locale.

But I should mention that I get this error on Mac OS X. I just tested the tool on Windows - and there I did not get the error!

Top

cron