• 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: Newbie query re notifications
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie query re notifications


  • Subject: Re: Newbie query re notifications
  • From: Matt Neuburg <email@hidden>
  • Date: Fri, 06 Mar 2009 11:03:30 -0800
  • Thread-topic: Newbie query re notifications

On Fri, 6 Mar 2009 11:18:56 -0500, "McLaughlin, Michael P."
<email@hidden> said:
>      [nc addObserver:self selector:@selector(getGPS) name:@"fetchGPS"
>object:nil];

Well, that's never going to work. There are two possibilities here:

(1) Maybe you've defined

- (void) getGPS: (NSNotification*) n

But in that case it will never be called because its name is getGPS:, and
you said getGPS which is not the same thing.

(2) Maybe you've defined

- (void) getGPS

But in that case it will never be called because that is not the format of
an eligible notification callback.

As the docs say, "The method the selector specifies must have one and only
one argument."

m.

--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
http://www.tidbits.com/matt/default.html#applescriptthings



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Newbie query re notifications
      • From: "Paul Sanders" <email@hidden>
  • Prev by Date: Re: Dynamic getting of a property of BOOL type
  • Next by Date: Re: interpretKeyEvents not handling HOME and END keys?
  • Previous by thread: Re: Newbie query re notifications
  • Next by thread: Re: Newbie query re notifications
  • Index(es):
    • Date
    • Thread