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: Cocoa and full-screen GL



I've gotten a few recommendations about overriding NSApp's sendEvent method, and this seems like doing the same thing but kind of in reverse.
It looks like most of my NSView functions (keyDown/mouseDown/etc) would transition over to this technique, but what about insertText?
keyUp and keyDown might seem like substitutes, but they don't handle complicated input (like Japanese inline input or even accented characters/dead keys). Knowing our business, I can practically guarantee that at some point we will need accented/composed characters to work.
So, hmm... is there any way I could override "sendEvent," catch all the events, and then route them to an NSView of my choice?


On Jan 31, 2005, at 6:15 PM, Guy English wrote:

Hi John,

On Mon, 31 Jan 2005 17:48:25 -0800, John Stiles <email@hidden> wrote:
> 3 - The other demos I've found that enter fullscreen mode will run
> their own event loop with, say, a while around [NSApp
> nextEventMatchingMask:NSAnyEventMask…].
> [snip] For example, command keys are no
> longer processed AFAICS (maybe I need to propagate events I'm not
> explicitly handling, but I don't know how to do this).

This is what I do in my code. If you don't like the event you can have
NSApplication send it down the responder chain by calling [NSApp
sendEvent: event]; I check [event window] against the window with my
GL context in it and pass it down the responder chain if it's not for
me.

Hope that helps,
Guy


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden

References: 
 >Re: Cocoa and full-screen GL (From: Guy English <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.