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

Subclassing NSNotificationCenter


  • Subject: Subclassing NSNotificationCenter
  • From: Neil Earnshaw <email@hidden>
  • Date: Thu, 4 Sep 2003 14:58:01 +0100

I need to subclass NSNotificationCenter so that I can provide a -removeObserver:selector:name:object: method (note the selector: in there).

I also want to coalesce notifications so I tried subclassing NSNotificationQueue and initializing the subclass with my own notification center. My queue accepts notifications quite happily, but my notification center's -postNotification: method is not being called. I had assumed that that was how a notification queue passes notifications to a notification center but it looks like I was wrong.

Has anyone out there successfully subclassed NSNotificationCenter or NSNotificationQueue?

Does anyone know how I can insert my own notification queue into the event loop so that it gets to process notifications each event cycle the way NSNotificationQueue does?

-Neil


Neil Earnshaw
Consultant Software Engineer
Object Software Engineers Ltd
email@hidden
Tel : 01747 854 852
Mbl : 07870 209 102
_______________________________________________
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: Subclassing NSNotificationCenter
      • From: Chris Kane <email@hidden>
  • Prev by Date: Re: Subclassing dictionaries?
  • Next by Date: Generating Unique ID
  • Previous by thread: Re: Split Buttons: How do I make em?
  • Next by thread: Re: Subclassing NSNotificationCenter
  • Index(es):
    • Date
    • Thread