Callback * managerCallback = [[[[Callback alloc] initWithTarget: self Action: @selector (Parse :)] autorelease];
This line of code is configured to invoke the Parse: instance method, and not the class method as you defined it.
Objective-C has no static methods. It has class methods and instance methods.
In addition, your methods should begin with lowercase letters.
Herp da Derp. Dave is right.
Considering this:
+(void)Validate { Callback *managerCallback = [[[Callback alloc] initWithTarget:self Action:@selector(Parse:)] autorelease]; ... } +(void)Parse:(Callback *)managerCallback { ... }
Some comments:
methods must begin with lowercase letters
it is extremely difficult to use a class in such a role; even if you really only need one of them, use an instance. At the very least, an instance is a convenient bucket for abandoning fortune, and this will make refactoring much easier in the future if you ever need two.
The above template makes an assumption (and I'm sure) that the Callback instance is saved. For callbacks, timers, and some other patterns, this is typical; keep the target until the target is called up for the last time. Then release (or the author). However, notification centers do not. Delegates are generally not saved.
source share