Re: Compiler warning - totally stumped
Re: Compiler warning - totally stumped
- Subject: Re: Compiler warning - totally stumped
- From: Chris Espinosa <email@hidden>
- Date: Sat, 03 May 2008 08:05:54 -0700
On May 3, 2008, at 3:10 AM, Ken Tozier <email@hidden> wrote:
Hi
I wrote a PHPInvocation class and am getting compile warnings for
one of its 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.
Is the warning so mysterious that you can't tell us what it is?
Chris
_______________________________________________
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