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 Apr 7, 2007, at 8:46 AM, Robin Sheat wrote:


If they are throwing Carbon into the mix then they also get
additional points for a even greater degree of difficulty.
Well, SWT uses carbon for its UI drawing and events, apparently due to the
fact that carbon and SWT have a very similar event model, so it was the easy
way out at the time SWT was written.

It was the only way out. This went back to 1.3 and earlier when the JVM was actually Carbon. It became Cocoa at 1.4.


So what needs to be done is a JNI layer to add the openDoc listeners
through carbon, which seems to be how Azureus does it (from what I can tell).


I'm learning much more than I ever wanted to know about this :)

Well farther down on one of my earlier URL's. Actually at the bottom of the page for
http://www.spacestar.net/users/mikehall/javasrc.html


That is basically how you can using JNI with Carbon handle AppleEvent's. Specifically written for 'gurl' type AppleEvent's since I assumed 'open document' was dealt with already. You can take a look at that, pretty simple. Actually I am trying to come up with a more involved Cocoa version that I figured would work better with the more usual (non-SWT) current JVM environment. Not complete, and no code posted yet, and not much help to you. Just another floating entry on the to-do list.
The above might be of a little assistance to you though. You would unfortunately still need to get some understanding of 'odoc' events and how they are handled. Samples should be about all over the place via Google though and in the Apple AppleScript samples.



Mike Hall mikehall at spacestar dot net http://www.spacestar.net/users/mikehall http://sourceforge.net/projects/macnative



_______________________________________________
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>)
 >Re: Conflict between Application and StartOnMainThread (From: Robin Sheat <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.