This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: -w option and JEmacs working again
- From: Jamison Hope <jrh at theptrgroup dot com>
- To: kawa list <kawa at sourceware dot org>
- Date: Fri, 11 Mar 2016 14:05:47 -0500
- Subject: Re: -w option and JEmacs working again
- Authentication-results: sourceware.org; auth=none
- References: <56E275B2 dot 3050402 at bothner dot com> <CAKJw4fcUGYv6s1+=nHLKs1PWccFNc1ibG9spGqpDcbXVeosggQ at mail dot gmail dot com> <56E311BE dot 2080408 at bothner dot com>
On Mar 11, 2016, at 1:43 PM, Per Bothner <per@bothner.com> wrote:
> Could someone else try on MacOS?
It happens for me, too. I believe the issue is that on the Mac OS X
port of the Java SE runtime, the AWT Event Dispatch Thread is not
the process's "main" thread, and so GuiConsole#setVisible() is
getting called off of the EDT.
Technically, I think all of the Swing instantiation is supposed to happen
on the EDT, but setVisible() seems to be the only one that *really*
matters.
This change to GuiConsole#init() fixes it for me:
> Index: kawa/GuiConsole.java
> ===================================================================
> --- kawa/GuiConsole.java (revision 8722)
> +++ kawa/GuiConsole.java (working copy)
> @@ -59,7 +59,7 @@
> //pack();
> setLocation(100 * window_number, 50 * window_number);
> setSize(700,500);
> - setVisible(true);
> + EventQueue.invokeLater(new Runnable() { public void run() { setVisible(true); }});
> }
>
> public GuiConsole(Language language, Environment penvironment, boolean shared)
Once it's up and running, though, I get an exception every time I hit backspace:
Exception in thread "AWT-EventQueue-0" java.lang.UnsupportedOperationException: gnu.lists.CharBuffer does not implement removePosRange
at gnu.lists.AbstractSequence.unsupportedException(AbstractSequence.java:207)
at gnu.lists.AbstractSequence.unsupported(AbstractSequence.java:201)
at gnu.lists.AbstractSequence.removePosRange(AbstractSequence.java:424)
at gnu.lists.AbstractSequence.removePos(AbstractSequence.java:409)
at gnu.lists.CharBuffer.delete(CharBuffer.java:39)
at gnu.kawa.swingviews.SwingContent.remove(SwingContent.java:70)
[...]
--
Jamison Hope
The PTR Group
www.theptrgroup.com