Re: XCode 2.0 warning with @class?
Re: XCode 2.0 warning with @class?
- Subject: Re: XCode 2.0 warning with @class?
- From: Marc Respass <email@hidden>
- Date: Wed, 28 Sep 2005 17:57:03 -0400
On Sep 28, 2005, at 5:34 PM, Markus Hitter wrote:
Am 28.09.2005 um 22:45 schrieb Marc Respass:
So what's the deal with @class then?
You can use @class if you want to inform the compiler such a class
exists. If one of your methods returns an instance of such a class,
for example. This doesn't include additional features (inheritance,
methods, ...) of the class, though.
You even need @class sometimes to avoid circular dependencies.
Think of a header for class A #importing the header for class B.
Class B's header can't #import class A's header now or you'd get a
circular dependency. You have to use a "@class A" statement.
Usually, you want a @class statement for the stuff in the header an
#import before you hit definitions. Having both in a header/source
pair is fine.
Thanks a lot, Markus. That does help. Seems like I have the wrong
usage then. I'll import.
Marc
_______________________________________________
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