Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Conflict between Application and StartOnMainThread



On Tuesday 03 April 2007 13:31:19 Michael Hall wrote:
> But yes what I was thinking was roughly as you indicate. Normal
> threading on the initial launch. That handles the OS X events and
> then starts a jvm with the SWT required thread options running the
> actual application code, also passing it the OS X event information
> as parameters.
I tried this, it seems to work (I haven't tested it fully) however, there is 
one significant problem: I end up with two running application icons, one for 
the loader, and one for the actual application. What I'd ideally like is just 
the one for the launcher, and the real app doesn't have one (so that it looks 
like there's one program, even though there are two running). Of course, it 
would have to behave like the icon belonged to the real app. 

I can't have the loader terminate immediately after launching the SWT app, as 
then I'll lose the ability to have associated documents opened when the 
program is already running (which is a very significant use case for this 
program).

What I'd be really happy to have happen is just get the file that was double 
clicked as a command line argument to a new instance, and then handle it 
myself. Hmm, it is possible to tell OSX that you are happy to have multiple 
instances, and the java stub that you want things on the command line? I 
haven't seen any mention of it anywhere, but maybe it's hiding from me :)

I just tested Azureus (torrent downloader, uses SWT also) and it is somehow 
able to work just fine. However, I had a look through its source code, and I 
have no idea how.

-- 
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

Attachment: pgpBKyzCALyDk.pgp
Description: PGP signature

 _______________________________________________
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

References: 
 >Re: Conflict between Application and StartOnMainThread (From: Robin Sheat <email@hidden>)
 >Re: Conflict between Application and StartOnMainThread (From: Michael Hall <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.