import
import
- Subject: import
- From: Daniel Child <email@hidden>
- Date: Wed, 23 Jan 2008 19:56:59 -0500
I have a strange case where a parse error occurs remotely if I add an
import statement.
If I remove the method call that requires this import statement, I
can compile the program just fine, and things work. Now if I add the
import statement, I get a parse error inside the file being imported.
In principle, parse error is supposed to be about syntax, so I
checked all semicolons and curlies. But adding
#import "xxxxx.h"
Any clues on where to look? Thanks.
Here was the relevant code:
#import <Cocoa/Cocoa.h>
#import "CentralController.h" // ERROR WHEN ADDING THIS
@interface ControllerA : NSWindowController
{
IBOutlet NSButton *aButton;
IBOutlet NSButton *bButton;
IBOutlet NSButton *cButton;
}
- (IBAction) openWindow: (id) sender;
@end
And the error occurs in the CentralController.h file (which worked
fine before.)
#import <Cocoa/Cocoa.h>
#import "ControllerA.h"
#import "ControllerB.h"
@interface CentralController : NSObject
{
IBOutlet NSButton *windowAButton;
IBOutlet NSButton *windowBButton;
IBOutlet NSButton *windowCButton;
IBOutlet NSWindow *centralWindow;
ControllerA *controllerA; // ERROR MYSTERIOUSLY APPEARS HERE
ControllerB *controllerB;
// ControllerC *controllerC;
}
- (void) openWindowA;
- (void) openWindowB;
- (void) openWindowC;
- (void) chooseWindow: (id) sender;
- (id) init;
@end
Thanks.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden