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

NSDistributedNotificationCenter


  • Subject: NSDistributedNotificationCenter
  • From: April Gendill <email@hidden>
  • Date: Tue, 16 Dec 2003 20:35:25 -0700

-(void)awakeFromNib{
[mainWindow makeKeyAndOrderFront:self];
[[NSDistributedNotificationCenter defaultCenter]
addObserver:[NSWorkspace sharedWorkspace]
selector:@selector([self addItemToTable:]) name:nil object:nil
suspensionBehavior:nil];
}


Above is the awake from nib I'm using. It adds a pretty wide
observer.... The problem is, once a notification is received (and it
seems to try to work) it attempts to have NSWorkspace perform the
addItemToTable method. The addItemToTable is mine however and thusly in
the main controller.
The way it is typed @selector([self addItemToTable:]) produces a parse
error: MainController.m:34: error: parse error before '[' token
. So how can I get the notification in the workspace to trigger a
method in my class?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: NSDistributedNotificationCenter
      • From: Nick Zitzmann <email@hidden>
  • Prev by Date: [ANN] Over 8mb of Open sourced Cocoa
  • Next by Date: Re: NSDistributedNotificationCenter
  • Previous by thread: [ANN] Over 8mb of Open sourced Cocoa
  • Next by thread: Re: NSDistributedNotificationCenter
  • Index(es):
    • Date
    • Thread