-1

The .h file:

@interface WibraryViewController : UIViewController <UIAlertViewDelegate> {    
    IBOutlet UIActivityIndicatorView *activityIndicatorView;
}
+ (void) notifyServerOfFileOpening:(NSString *) docName;

The .m method:

+ (void) notifyServerOfFileOpening:(NSString *) docName
{
    NSLog(@"doc opened name = %@", docName);
}

The line in another class that generates the 'No known class method for selector' error:

[WibraryViewController notifyServerOfFileOpening];

I'm guessing this might have something to do with the fact that UIAlertViewDelegate delegate is being used but I haven't really grasped how delegates work yet. Of course, it could also be something entirely different.

I was hoping someone could point out the problem? Thanks.

Robert
  • 5,278
  • 43
  • 65
  • 115

2 Answers2

3

You forgot to pass the "docName" parameter. You are calling

[WibraryViewController notifyServerOfFileOpening];

instead of

[WibraryViewController notifyServerOfFileOpening:@"YourDocName"];

Hope that helps ;)

Boris Prohaska
  • 912
  • 6
  • 16
  • Whoops - guess who is feeling rather stupid? Thank you very much. I'll accept your answer as soon as the site allows. – Robert Dec 13 '12 at 16:14
1

you should add a parameter docName:

[WibraryViewController notifyServerOfFileOpening:yourDocName];

the selector you use currently is notifyServerOfFileOpening, but the selector you have to use is like notifyServerOfFileOpening:.

Herm
  • 2,956
  • 19
  • 32