Re: Compiler warning - totally stumped
Re: Compiler warning - totally stumped
- Subject: Re: Compiler warning - totally stumped
- From: Jean-Daniel Dupas <email@hidden>
- Date: Sat, 3 May 2008 17:54:35 +0200
Le 3 mai 08 à 17:33, Ken Tozier a écrit :
Here's the class interface where it's declared
@class PHPInvocation;
@interface LayoutDirectoryWatcher : NSObject
{
NSString *site,
*layoutDirectory;
NSURL *scriptURL;
PHPInvocation *invocation; // <- invocation declaration
NSTimer *timer;
NSDictionary *directoryAttributes;
BOOL initialized;
PHPInvocation *script;
}
// and here's the method where I initialize/invoke it
- (id) initLayoutDirectoryWatcher
{
if (self = [super init])
{
[self initPrefs];
initialized = NO;
// initialize (scriptURL is initialized inside 'initPrefs' from a
prefs file)
invocation = [[PHPInvocation invocationWithURL: scriptURL]
retain];
// invoke (compiler throws following error for invokeWithSelector
line)
// 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;
}
If I copy and paste all thoses pieces in a file, It compiles without
warning.
The only reason I see is that your PHPInvocation declaration is not
properly imported. Try to preprocess the file (right clic on it,
Preprocess) and check that the declaration is really imported before
the initLayoutDirectoryWatcher method.
_______________________________________________
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