• 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
Cocoa in Carbon and NSNotifications
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Cocoa in Carbon and NSNotifications


  • Subject: Cocoa in Carbon and NSNotifications
  • From: Tomas Franzén <email@hidden>
  • Date: Sat, 25 Feb 2006 22:52:21 +0100

Hi,

I'm registering for the NSWorkspaceDidLaunchApplicationNotification notification in a Carbon app. The problem is that it's never triggered.
This is the code I'm using:


- (void)doTheStuff {
[[[NSWorkspace sharedWorkspace] notificationCenter] addObserver:self selector:@selector(notificationFired:) name:NSWorkspaceDidLaunchApplicationNotification object:nil];
}


- (void)notificationFired:(NSNotification *)notification{
	NSLog(@"Yo!");
}

The notificationFired: method is never called. I've tried other notifications, and they don't work either. Is there something special I need to do first in order for this to work? I call +[NSApplication sharedApplication] to initialize AppKit, but that doesn't seem to make any difference. It works perfectly in my Cocoa apps, so I figure it has something to do with the fact that this is a Carbon app.

Thanks,

Tomas Franzén
Lighthead Software
http://www.lightheadsw.com/ _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Cocoa in Carbon and NSNotifications
      • From: Rosyna <email@hidden>
    • Re: Cocoa in Carbon and NSNotifications
      • From: j o a r <email@hidden>
    • Re: Cocoa in Carbon and NSNotifications
      • From: Nick Zitzmann <email@hidden>
  • Prev by Date: Re: iTunes like toolbar
  • Next by Date: Re: Cocoa in Carbon and NSNotifications
  • Previous by thread: Re: NSTableview & Core Data
  • Next by thread: Re: Cocoa in Carbon and NSNotifications
  • Index(es):
    • Date
    • Thread