Hi everybody,

For various reasons, my Cocoa app runs its own event loop instead of
using [NSApplication run]. What I do is roughly the following, in a
loop:

e = [self nextEventMatchingMask: NSAnyEventMask
                            untilDate: [NSDate distantFuture]
                               inMode: NSDefaultRunLoopMode
                              dequeue: YES];
if (e)
        [self sendEvent: e];

... more logic ...

This works fine except for one issue; when switching between windows
using Expose, clicking on one of my app's windows doesn't always bring
it to the front.

Is there something magical that [NSApplication run] does which my app
is not doing?

The documentation for [NSApplication run] does suggest that it is ok
to override it, and from this I inferred that the logic is simple
enough that one can duplicate it. Is this information out of date?
Have newer OS X features made it necessary to handle events by calling
[NSApplication run]?

Slava
_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to