Compiler warning - totally stumped
Compiler warning - totally stumped
- Subject: Compiler warning - totally stumped
- From: Ken Tozier <email@hidden>
- Date: Sat, 3 May 2008 06:10:59 -0400
Hi
I wrote a PHPInvocation class and am getting compile warnings for one
of it's methods. I've spent around 3 hours trying to figure out why
it's not seeing the method but can't find a single thing wrong. I've
been using this class without incident for over two years, yet today
when I try to use it, I get this mysterious warning...
Here's what I've tried so far:
Carefully checked that the method interface in the "PHPInvocation.h"
file matches the method implementation . It does
Carefully checked to make sure the header file is actually included
in the files that use it. It is.
Made sure the compile flag is checked for "PHPInvocation.m"
Deleted "PHPInvocation.h" and "PHPInvocation.m" from the project and
reimported them. No luck
Cleaned all targets and rebuilt the project. Warning is still there.
I'm out of ideas. What could cause this warning when everything
appears to be in order?
Here's the relevant code:
// Cass interface and implementation
@interface PHPInvocation : NSObject <NSCoding>
- (id) invokeWithSelector:(NSString *) inSelector
arguments:(id) inArguments;
@end
@implementation PHPInvocation
- (id) invokeWithSelector:(NSString *) inSelector
arguments:(id) inArguments
{
[scriptSelector release];
scriptSelector = [inSelector copy];
[scriptArguments release];
scriptArguments = [inArguments copy];
[self refreshRequest];
return [self invoke];
}
@end
// include header
#import "PHPInvocation.h"
// Use it
- (id) initLayoutDirectoryWatcher
{
if (self = [super init])
{
[self initPrefs];
initialized = NO;
invocation = [[PHPInvocation invocationWithURL: scriptURL] retain];
NSLog(@"invocation: %@", invocation);
// I get a warning on the next line that states:
// warning: PHPInvocation may not respond to
'invokeWithSelector:arguments:'
layoutDirectory = [invocation invokeWithSelector:
@"layout_plan_directory_for_site" arguments: site];
NSLog(@"layoutDirectory: %@", layoutDirectory);
directoryAttributes = [[[NSFileManager defaultManager]
fileAttributesAtPath: layoutDirectory traverseLink: NO] retain];
[self startTimer];
}
return self;
}
Anyone see where I'm screwing up?
Any help appreciated.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden