• 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
Re: NSWorkspace's notificationCenter
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSWorkspace's notificationCenter


  • Subject: Re: NSWorkspace's notificationCenter
  • From: j o a r <email@hidden>
  • Date: Mon, 14 Mar 2005 09:45:29 +0100


On 2005-03-14, at 06.59, Joannou Ng wrote:

Remove does the following:
- (IBAction)remove:(id)sender {
[[[NSWorkspace sharedWorkspace] notificationCenter] removeObserver:self name:@"NSWorkspaceDidMountNotification" object:[NSWorkspace sharedWorkspace]];
}

I would be really surprised if it were intended that you should type @"NSWorkspaceDidMountNotification", I think it should be NSWorkspaceDidMountNotification (ie. not type as a constant string, but rather using the defined name).
In many cases I expect the strings to be the same, but in some cases in Cocoa they clearly are not. Not that I expect it to solve this particular problem - but it is probably a good thing to learn / keep in mind.


Like Dan said, I also think it's good practice to unsubscribe from all objects, and not just one particular object. Most of the time that's what you want anyway.

That said, if you can't get it to work like you expect, create a reproducible case and attach it to a bug report.

j o a r

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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

References: 
 >NSWorkspace's notificationCenter (From: Joannou Ng <email@hidden>)

  • Prev by Date: Re: Training in Australia?
  • Next by Date: Handle keyboard events
  • Previous by thread: Re: NSWorkspace's notificationCenter
  • Next by thread: Re: Cocoa-dev Digest, Vol 2, Issue 346
  • Index(es):
    • Date
    • Thread