Non-CAPI GUI thread on LWM?
Hi,
On LWM OS X, I have some code which uses Java, and specifically (Eclipse)
SWT, to do some GUI. I launch this code from the listener via
mp:process-run-function and can get a window up, but, after starting its
message loop, it gets no messages, and the LispWorks IDE menus become
unresponsive. Other IDE features continue to work.
The same exact code works on LWW - launched windows work fine with no
apparent IDE side-effects, so I am presuming there is some bad interaction
on the Mac between SWT (which is Carbon, I think) and LWM/CAPI's
(single-threaded?) use of Cocoa. Or perhaps it's just the IDE trying to
manage the launched window for menu-bar sharing (which doesn't occur on
Windows?)
In any case, my questions are, is there a way to start a thread from the
listener with no interdependence on, or interaction with, CAPI and the LWM
IDE UI, and, given that, are there any inherent problems in doing UI
independent of CAPI from the IDE?
Thanks,
Rich
p.s. here's the code, though not particularly illustrative as it depends
upon a lot of other code, SWT, and Java:
;the Eclipse SWT Hello World snippet in CL
;Java FLI elided
(mp:process-run-function "swt-proc" '()
(lambda ()
(let* ((display (new display.))
(shell (new shell. display)))
(shell.setlocation shell 100 100)
(shell.open shell)
(do ()
((shell.isdisposed shell))
(unless (display.readanddispatch display)
(display.sleep display)))
(display.dispose display))))