Newbie query re notifications

2009-03-06 Thread McLaughlin, Michael P.
I have been using notifications in a simple document app that processes data from a datafile. This app has a document window and an appDelegate, both of which appear in IB with the proper connections. The document can successfully send notifications to the appDelegate and the latter can send

Re: Newbie query re notifications

2009-03-06 Thread Kyle Sluder
On Fri, Mar 6, 2009 at 11:18 AM, McLaughlin, Michael P. mp...@mitre.org wrote: Today, I realized that I should have a separate class for some of the data processing.  This separate class, SatManager, has no GUI elements and does not appear in IB in any way.  Its implementation includes Classes

Re: Newbie query re notifications -- SOLVED

2009-03-06 Thread McLaughlin, Michael P.
Error was of the typo variety. Too embarrassing to describe further :-( -- Mike McLaughlin ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at

Re: Newbie query re notifications

2009-03-06 Thread Matt Neuburg
On Fri, 6 Mar 2009 11:18:56 -0500, McLaughlin, Michael P. mp...@mitre.org 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

Re: Newbie query re notifications

2009-03-06 Thread Paul Sanders
But in that case it will never be called because its name is getGPS:, and you said @selector(getGPS) which is not the same thing. Yes, that one gets me every time. Why, when you do @selector(oops_i_forgot_the_colon) does the compiler not flag it as an error (or at least a warning). Can you

Re: Newbie query re notifications

2009-03-06 Thread Joar Wingfors
On Mar 6, 2009, at 11:21 AM, Paul Sanders wrote: Yes, that one gets me every time. Why, when you do @selector(oops_i_forgot_the_colon) does the compiler not flag it as an error (or at least a warning). Can you put any old thing in the brackets there? I'd suggest using:

Re: Newbie query re notifications

2009-03-06 Thread Jean-Daniel Dupas
Le 6 mars 09 à 20:47, Joar Wingfors a écrit : On Mar 6, 2009, at 11:21 AM, Paul Sanders wrote: Yes, that one gets me every time. Why, when you do @selector(oops_i_forgot_the_colon) does the compiler not flag it as an error (or at least a warning). Can you put any old thing in the

Re: Newbie query re notifications

2009-03-06 Thread Paul Sanders
I'd suggest using: -Wundeclared-selector j o a r Excellent. Thank you. Of course you can put anything. Else how would you be able to create a method and a selector at runtime ? So how does the compiler map any old string to a SEL (which is just a number)? Is it some kind of hash (in

Re: Newbie query re notifications

2009-03-06 Thread Jean-Daniel Dupas
Le 6 mars 09 à 21:25, Paul Sanders a écrit : I'd suggest using: -Wundeclared-selector j o a r Excellent. Thank you. Of course you can put anything. Else how would you be able to create a method and a selector at runtime ? So how does the compiler map any old string to a SEL (which