Re: Framework and NSApplication
Re: Framework and NSApplication
- Subject: Re: Framework and NSApplication
- From: Ken Worley <email@hidden>
- Date: Fri, 8 Aug 2008 09:03:49 -0600
On Aug 7, 2008, at 5:55 PM, Kiel Gillard wrote:
@synthesize greeting;
I'm writing a Cocoa framework that links with an old Carbon
application. The
Carbon application indirectly interacts with it through a wrapper
framework.
Within the Cocoa framework, I want to observe the
NSApplicationWillTerminateNotification notification, posted by the
NSApplication to the default NSNotificationCenter. However, my
method does
not seem to be invoked.
Figuring there was some incompatibility with NSApplication and the
fact the
framework is being dynamically linked to an old Carbon application, I
installed a Carbon event handler for the application quitting. The
callback
does not seem be invoked by the Carbon Event Manager.
Any suggestions as to how I could code the framework to notice when
the
application it's linked to is quitting?
Thanks,
Kiel
Try specifying an application delegate and implement the
applicationWillTerminate method which receives an NSNotification
object as an argument.
Ken
--
Ken Worley
Software Engineer, Tiberius, Inc.
_______________________________________________
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