Re: Help on Cocoa Class references
Re: Help on Cocoa Class references
- Subject: Re: Help on Cocoa Class references
- From: Marco Frisan <email@hidden>
- Date: Thu, 20 Jan 2011 21:59:23 +0100
> Message: 3
> Date: Wed, 19 Jan 2011 22:18:04 -0500
> From: Scott Anguish <email@hidden>
> Subject: Re: Help on Cocoa Class references
> To: Leanne Attard <email@hidden>
> Cc: email@hidden
> Message-ID: <email@hidden>
> Content-Type: text/plain; charset=windows-1252
>
> I‚m surprised nobody else mentioned this.
>
> The Java bridge isn‚t supported and you can no longer write Cocoa apps in Java. So you‚re much better off learning Obj-C or going fully Java. Or even Ruby
>
> Apple won‚t even be shipping Java with the OS in the future (there was an announcement about this recently). You‚ll need to get it from Oracle (who Apple transferred things to as I recall in another announcement)
>
> All Java Class References which may have existed (and only for public classes, none those were as I recall) are gone. The process for creating those docs are gone. We no longer support or generate them (I‚m in the documentation department).
>
> Sorry to be a wet noodle.
Java 6 is still available and it is not deprecated. It provides the com.apple.eawt. The list of deprecated classes and methods of that package is here: http://developer.apple.com/library/mac/documentation/Java/Reference/JavaSE6_AppleExtensionsRef/api/deprecated-list.html
Mac OS X port of the Open JDK 7, that has contributes from the original Apple source code, since the begin of january, also has com.apple.eawt package in its project status page.
Though, I think we should concentrate on the Leanne's goal. She wants to draw over a Java AWT component using OpenGL and she wants to handle mouse events (and probably keyboard events).
The only way to use OpenGL to draw over a Java AWT component is to implement a JNI based interface.
Probably Java AWT components, in the Mac OS X implementation of Java, are already implemented through JNI and are probably derived from Cocoa native components (like NSView).
So, probably, Leanne does not need to implement its own NSView and place it through CocoaComponent in the AWT window.
What she need is to initialize a NSOpenGLPixelFormat and a NSOpenGLContext, using JNI and providing JNI functions to create, access and manipulate these objects. Furthermore she needs to implement JNI functions that wrap OpenGL interface. The rest of the operations can be done in pure Java code (included event handling).
Since this is a long work and there are "ready to use" OpenGL Java bindings like LWJGL or JOGL, I suggest to use them.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden