• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Handling NSApplicationDefined events
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Handling NSApplicationDefined events


  • Subject: Re: Handling NSApplicationDefined events
  • From: Quincey Morris <email@hidden>
  • Date: Thu, 3 Sep 2009 13:51:17 -0700

On Sep 3, 2009, at 13:39, McLaughlin, Michael P. wrote:

The one example I found like that passed the event on even though it had
been handled.


Is

@interface MyApplication : NSApplication
{
}

@implementation MyApplication
-(void)sendEvent:(NSEvent *)evt
{
   if ([evt type] == NSApplicationDefined)
       <doSomething>
   else
       [super sendEvent:evt];
}
@end

better?

Yes. I didn't want to risk insulting you by telling you what you already knew. As you did know. :)


I *did* risk insulting you by reminding you to change the Principal Class, because that's easy to overlook even when you know it needs to be done.


_______________________________________________

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


References: 
 >Re: Handling NSApplicationDefined events (From: "McLaughlin, Michael P." <email@hidden>)

  • Prev by Date: Re: watch changes to any properties on an object
  • Next by Date: Does -[NSFileManager attributesOfItemAtPath:error:] traverse symlinks?
  • Previous by thread: Re: Handling NSApplicationDefined events
  • Next by thread: change in launch services binding behavior?
  • Index(es):
    • Date
    • Thread