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

Re: Notification problem


  • Subject: Re: Notification problem
  • From: Andy Lee <email@hidden>
  • Date: Tue, 30 Apr 2002 22:55:12 -0400

At 9:24 PM -0500 4/30/02, Al Kirkus wrote:
When I prefixed NS to the name of my "WindowDidBecomeKeyNotification" I resolved my own issue. (just like it said in the documentation)


Better yet, you could use the Cocoa constant defined for this purpose, instead of a hard-coded string:

[nc addObserver:self
selector:@selector(setKeyWindowFromNotification:)
name:NSWindowDidBecomeKeyNotification
object:nil];

Then the compiler would have caught the typo.

--Andy
_______________________________________________
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.

References: 
 >Re: Notification problem (From: "Al Kirkus" <email@hidden>)

  • Prev by Date: Re: How do I change the default scrolling behavior
  • Next by Date: Re: NSTextView: how to avoid insertion of text
  • Previous by thread: Re: Notification problem
  • Next by thread: NSCalendarDate -> UTCDateTime
  • Index(es):
    • Date
    • Thread