@class causing grief
@class causing grief
- Subject: @class causing grief
- From: Stuart Malin <email@hidden>
- Date: Tue, 18 Mar 2008 07:18:51 -1000
Scott,
I notice that I get the AT_NAME compiler error when I've forgotten or
mistyped a semicolon _prior_ to the place where an @ symbol is used.
For instance, in the following code:
@class SomeClassA
@class SomeClassB;
@interface test : NSObject {
SomeClassA *someClassA;
SomeClassB *someClassB;
}
The compiler will report "parse error before 'AT_NAME' token for the
line
@class SomeClassB;
yet the problem is on the _prior_ line -- the missing semicolon at
the end -- and so the token "SomeClassA" ends up not being defined
(which is why the compiler will also report "parse error before
'SomeClassA'" for the line
SomeClassA *someClassA;
HTH,
--Stuart
On Mar 17, 2008, at 11:48 PM, Scott Squireswrote:
I'm starting to go in circles at this point.
I know I've got a number of interconnecting files.
Since I was getting errors I replaced the #import as much as possible
with @class defines
I'm still getting the following error:
error: syntax error before 'AT_NAME' token
This indicates @class myClass; in the following examples.
Most of these work fine but if I end up swapping #import instead then
other areas break the compiler.
Any suggestions on areas to look at (missing @end or something else?)
Thanks.
example:
#import <stdStuff/stdStuff.h>
@class myClass;
@interface anotherClass : NSObject
{
myClass *theMyClassObject;
}
@end
_______________________________________________
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