views:

70

answers:

2

In my .m file I call a method that is inside the same .m file. In the header I have the correct import for the header but I keep getting this alert:

alt text

What am I doing wrong? What should I do in order to make this error disappear? I'm kinda lost here :-(

Even if I changed this to:

NSString *path = [[NSString alloc] 
   initWithString:@"...."];
[self parseXMLFileAtURL:path];
[path release];
+2  A: 

You can just declare the method in your .h file. Or move the method implementation ahead of where it is called, if it's not going to be called from another class.

Paul Lynch
ohh.... I completely forgot to add the method to the interface! Ty!
balexandre
A: 

In you implementation file (BlogViewController.m), add an extension interface like so:

@interface BlogViewController ()
- (void) parseXMLFileAtURL:(NSString *)URL;
@end

@implementation BlogViewController 
...

This tells the compiler to expect the method but keeps it protected if no external object needs to call it.

TechZen
ty, but as a beginner I rather put interface stuff in the `.h` file (header) :)
balexandre