On Sunday 08 April 2007 00:46:04 Michael Hall wrote:
> What you could do is have the launcher run off of it's own thread
> that just idles but includes the event handler.
No, I tried that. It makes SWT unhappy. I think the events expect to have the
primary thread, and SWT expects to have it too, and so you can either have
events and no UI, or the UI and no events.
> It seems then there might be a solution to the threading problem
> after all? Without looking I'm not sure what it would be either.
> Maybe someone else on the list might still have suggestions there.
I've spent a bit of time on #azureus-hackers and looking through the Azureus
source code. There seems to be some real black magic going on there. It's
using a combination of JNI and swt.internal.carbon hooks into the OS to do
it.
If anyone's curious, it has a class OSXAccess.java and a JNI library
OSXAccess.c that seems to handle that (and CarbonUIEnhancer.java that
actually uses the functions in them). My guess is that it's using the Carbon
hooks into OSX to do it (given that SWT uses carbon and Apple's Java uses AWT
for the events, which is the source of the whole 'not working' thing in the
first place).
Unfortunately, the code isn't especially well documented, thus it's hard to
tell what's going on in much of it, so it'll take a while to persuade it to
work. But I'll document it if I get it working for the benefit of those who
follow :) Maybe I can even generalise it into its own library if I get time,
I could see that being useful.
it might be a while though...
Oh, I also just noticed that I'm not getting any messages from the list except
for my own first post a while back. That's why I haven't followed up anything
but your one which was CC:ed to me. I wonder why that is...
--
Robin <email@hidden> JabberID: <email@hidden>
Hostes alienigeni me abduxerunt. Qui annus est?
PGP Key 0xA99CEB6D = 5957 6D23 8B16 EFAB FEF8 7175 14D3 6485 A99C EB6D
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden
This email sent to email@hidden