• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
import
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: import
      • From: Nick Zitzmann <email@hidden>
  • Prev by Date: Using custom, yet animated outline cell images in NSOutlineViews
  • Next by Date: re: Core Data Performance
  • Previous by thread: Using custom, yet animated outline cell images in NSOutlineViews
  • Next by thread: Re: import
  • Index(es):
    • Date
    • Thread