RE: Help on Cocoa Class references
RE: Help on Cocoa Class references
- Subject: RE: Help on Cocoa Class references
- From: Shawn Bakhtiar <email@hidden>
- Date: Tue, 18 Jan 2011 18:37:11 -0500
- Importance: Normal
Shoudn't the Java AWT have these functions exposed on the window instance?
http://journals.ecs.soton.ac.uk/java/tutorial/post1.0/ui/mouselistener.html (First one I found on google)
But if what you are looking for is to track objects inside the OGL window you would probably have to use some kind of picking technique
http://www.lighthouse3d.com/opengl/picking/
Either way OGL views are special, they are not handled in the same way. But I have written several programs that use NSOpenGLView and of all the problems I had, getting the mouse events was not one of them.
http://developer.apple.com/library/mac/#documentation/cocoa/Reference/ApplicationKit/Classes/NSOpenGLView_Class/Reference/Reference.html
It inherits from NSResponder.
> Date: Tue, 18 Jan 2011 07:27:10 -0800
> From: email@hidden
> To: email@hidden
> CC: email@hidden
> Subject: Re: Help on Cocoa Class references
>
> Ok thanks for your explanation about private classes!
>
> I am developing a java application displaying a window, and then i am taking its native part to draw onto it using openGL, the native part gives me a NSView pointer. I am able to draw onto it however not able to get mouse/key events appropriately. I am using a category for NSView to override acceptFirstResponder method and other mouse events related methods.
>
> When i click on the title bar, rightmouse down, mouseup and so on are entered as expected (except for mouseDown) however when i click on the rest of the frame the acceptsFirstResponder method is entered but then nothing happens on subsequent mouse clicks or keyboard events.
>
>
> --- On Tue, 1/18/11, Uli Kusterer <email@hidden> wrote:
>
> > From: Uli Kusterer <email@hidden>
> > Subject: Re: Help on Cocoa Class references
> > To: "Leanne Attard" <email@hidden>
> > Cc: email@hidden
> > Date: Tuesday, January 18, 2011, 2:57 PM
> >
> > On Jan 18, 2011, at 11:46 AM, Leanne Attard wrote:
> > > NSWindowViewAWT when the window is started
> >
> > That looks like a private class used internally by Apple's
> > AWT Java implementation. Probably a replacement for the
> > window's content view would be my guess.
> >
> > > NSThemeFrame when clicking on the title bar
> >
> > That's a private class used by Apple to draw the window
> > frame of every Cocoa window.
> >
> > > NSViewAWT when click on the rest of the frame area
> >
> > Probably also a private class used to actually implement
> > Apple's version of AWT for the Mac's Java.
> >
> > In short, they are private classes, which means you
> > shouldn't mess with them, and there is no public
> > documentation. However, they are likely all NSView
> > subclasses, so you can probably do some of the standard
> > things that one can do with an NSView.
> >
> > Still you shouldn't have to mess with things at this
> > level. What are you trying to do?
> >
> > Cheers,
> > -- Uli Kusterer
> > "The Witnesses of TeachText are everywhere..."
> >
> >
> >
> >
>
>
>
> _______________________________________________
>
> 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
_______________________________________________
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