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

NSWorkspaceDidLaunchApplicationNotification


  • Subject: NSWorkspaceDidLaunchApplicationNotification
  • From: Finlay Dobbie <email@hidden>
  • Date: Tue, 13 Nov 2001 22:45:40 +0000

In a Foundation tool, I have:

[[[NSWorkspace sharedWorkspace] notificationCenter] addObserver:controller selector:@selector(foo:) name:NSWorkspaceDidLaunchApplicationNotification object:nil];

[[NSRunLoop currentRunLoop] run];

Where controller is an object that is properly initialised and has the method:
- (void)foo:(NSNotification *)notification {
NSLog(@"Application launched: %@", [[notification userInfo] objectForKey:@"NSApplicationName"]);
}

It runs but foo: never gets called and I don't get any output. Anybody have any idea why? I am linking against AppKit etc etc...

-- Finlay


  • Follow-Ups:
    • Re: NSWorkspaceDidLaunchApplicationNotification
      • From: Douglas Davidson <email@hidden>
  • Prev by Date: Modifier keys
  • Next by Date: Re: global automation, anyone?
  • Previous by thread: Re: Modifier keys
  • Next by thread: Re: NSWorkspaceDidLaunchApplicationNotification
  • Index(es):
    • Date
    • Thread