Re: Warnings that won't go away
Re: Warnings that won't go away
- Subject: Re: Warnings that won't go away
- From: Dan Messing <email@hidden>
- Date: Wed, 30 Nov 2005 11:23:33 -0600
@class is useful if you just want a header file to know that the
class exists, for example if it is being used as a parameter or
return value for a function, or if you want to declare an instance
variable of that type.
#import needs to be used if you're instantiating objects of the
class, using methods from the class, or in the header file if you're
inheriting from the class.
Personally, I wouldn't recommend adding any more #imports you
actually have to to the header file I think that will just add more
confusion to the problem that you started with, even if it does get
rid of some warnings.
Dan Messing
Stunt Software
http://www.stuntsoftware.com/
On Nov 30, 2005, at 7:08 AM, email@hidden wrote:
Thanks,
The problem was that I was not including the header file (Playlist.h).
Which leads to my next newbie question. What's the difference between
the @class directive and the #import directive...when should I use one
and not the other? I was using @class, and getting warnings. Do I need
to use #import when I am calling specific methods of my class, and use
@class when I want to instantiate a member variable of a particular
class?
Thanks again,
Tom
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden