This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: -w option and JEmacs working again


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




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]