Re: Mysterious Build Error
Re: Mysterious Build Error
- Subject: Re: Mysterious Build Error
- From: sinclair44 <email@hidden>
- Date: Wed, 26 Mar 2003 17:52:35 -0500
On 3/26/03 5:00 PM, "Vincenzo Kreft-Kerekes" <email@hidden>
wrote:
>
Dear All,
>
>
I'm trying to introduce two objects to each other using the most recent PB
>
but this apparently simple scheme fails during build with - parse error
>
before "Second" - and I have no clue as to why this is nor why it compiles
>
if I remove the #import <First.h> line from Second.h, leaving everyhing else
>
untouched. In the sample files below both implementations are empty. What am
>
I missing here? I would greatly appreciate any hints.
>
>
Thanks a lot,
>
Vincenzo
The standard way of doing classes like this is:
*** ClassA.h ***
#import <Cocoa/Cocoa.h>
@class ClassB;
@interface ClassA : NSObject
{
ClassB *ptrB;
}
@end
*** ClassA.m ***
#import "ClassA.h"
#import "ClassB.h"
@implementation ClassA
@end
*** ClassB.h ***
#import <Cocoa/Cocoa.h>
@class ClassA;
@interface ClassB : NSObject
{
ClassA *ptrA;
}
@end
*** ClassB.m ***
#import "ClassB.h"
#import "ClassA.h"
@implementaion ClassB
@end
--
-- sinclair44
[self becomeWorldDictator];
- (void)becomeWorldDictator
{
[self coverLegalButt];
[[GeorgeBush principalClass] assassinate:[world currentLeaders]];
[[BinLaden principalClass] terrorize:[world citizens]];
[world setCurrentLeaders:[NSArray arrayWithObject:self]];
}
- (void)coverLegalButt
{
/* The above does not reflect any plans, expressed or implied, real or
imaginative, to kill or assassinate anyone, or to harm anyone in any shape,
way or form. Any relation to actual events is purely coincidental. */
}
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.