• 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: NSApplicationMain question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSApplicationMain question


  • Subject: Re: NSApplicationMain question
  • From: Abhinay Kartik Reddyreddy <email@hidden>
  • Date: Thu, 22 Apr 2010 16:39:10 -0400

What evets are you looking for...?? all events in the event loop...?? or soem specific events....??

 you get key and mouse events inside NSView. If you are looking to capture events at NSWindow or NSApp level override sendevent method....

- (void) sendEvent:(NSEvent *)cocoaEvent


On Apr 22, 2010, at 4:34 PM, Bill Appleton wrote:

> hi all,
>
> thanks for the feedback
>
> i wrote a subclass for NSWindow but now i am wondering how usefull that was
>
> do i have to subclass NSWindow to get events, or can I use delegates?
>
> i'm still a bit confused on the event model
>
>
>
> thanks,
>
> bill
>
>
>
>
>
>
>
>
> On Thu, Apr 22, 2010 at 12:39 PM, Abhinay Kartik Reddyreddy <email@hidden> wrote:
> Try the NSApplicationDelegate .....
>
>
> On Apr 21, 2010, at 6:50 PM, Bill Appleton wrote:
>
> > hi all,
> >
> > i am converting from carbon to cocoa
> >
> > with NSApplicationMain i need to know how to call some startup code before
> > receiving events
>
> use -applicationWillFinishLaunching
>
> > and upon quit i need to call some shutdown code
> >
>
> use -applicationWillTerminate
>
> > are there some docs on this issue? examples? advice?
> >
>
> http://developer.apple.com/mac/library/documentation/cocoa/reference/NSApplicationDelegate_Protocol/Reference/Reference.html#//apple_ref/doc/uid/TP40008592-CH1-DontLinkElementID_2
>
> >
> > thanks,
> >
> > bill appleton
> > _______________________________________________
> >
> > 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

  • Follow-Ups:
    • Re: NSApplicationMain question
      • From: Bill Appleton <email@hidden>
References: 
 >NSApplicationMain question (From: Bill Appleton <email@hidden>)
 >Re: NSApplicationMain question (From: Abhinay Kartik Reddyreddy <email@hidden>)
 >Re: NSApplicationMain question (From: Bill Appleton <email@hidden>)

  • Prev by Date: Re: NSApplicationMain question
  • Next by Date: Re: setValue:forKey: and to-many relationships
  • Previous by thread: Re: NSApplicationMain question
  • Next by thread: Re: NSApplicationMain question
  • Index(es):
    • Date
    • Thread